fast_jsonapi icon indicating copy to clipboard operation
fast_jsonapi copied to clipboard

Allow "if: Proc..." on link

Open listrophy opened this issue 5 years ago • 1 comments

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

listrophy avatar Sep 13 '19 14:09 listrophy

Looks like an improvement. You're welcome to add the PR here too: https://github.com/fast-jsonapi/fast_jsonapi/issues/1

jopotts avatar Oct 07 '19 23:10 jopotts