-
Notifications
You must be signed in to change notification settings - Fork 108
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
Pass view
to associations
#306
Comments
https://www.rubydoc.info/gems/blueprinter/Blueprinter/Base#association-class_method
|
Thanks @Manifold0, but that's not the case. The goal is to call |
@shayani I think I understand the problem better now. You want the view parameter from the parent |
This project is all but dead, pls refer here. If you feel this is a genuine usecase pls feel free to raise a PR on the fork, I'd be glad to take it forward.. |
class SchoolBlueprint << Blueprinter::Base
field :name
field :students do |object, options|
StudentsBlueprint.render(object.students, view: options[:view])
end
end |
Thank you @sdrioux! |
|
How can I pass the view I'm rendering to nested associations?
Follows an example:
The text was updated successfully, but these errors were encountered: