-
Notifications
You must be signed in to change notification settings - Fork 110
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
lazy load for association #359
Comments
The feature request I read here is optional associations. Blueprinter already has optional fields via Rails already has a way to detect if associations are eager loaded. So if Blueprinter adds class WidgetBlueprinter < Blueprinter::Base
association :category, if: ->(_field, widget, _opts) {
widget.association(:category).loaded?
}
end |
Thanks for your answer. But I think I will monkey patch the extractor because if we use that approach, every association needs the condition |
Hi,
I wanna skip association if I don't eager load it. The association extractor does not support it at the moment I guess.
I wonder what is the correct way to do the lazy load for blue printer?
Thanks.
The text was updated successfully, but these errors were encountered: