Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "if: Proc..." on link #15

Conversation

listrophy
Copy link
Contributor

See also Netflix/fast_jsonapi#442

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

@kpheasey kpheasey merged commit ddc261d into jsonapi-serializer:dev Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants