fast_jsonapi
fast_jsonapi copied to clipboard
Allow "if: Proc..." on link
Just like attribute
, this PR allows the dev to specify links as follows:
link(:download, if: ->(obj, params) { params && params[:signed_url] }) do |obj, params|
params[:signed_url]
end
Looks like an improvement. You're welcome to add the PR here too: https://github.com/fast-jsonapi/fast_jsonapi/issues/1