When using accepts_nested_attributes_for to help streamline adding multiple related models it would often be of benefit to be able to limit some options based on the "parent" model.
Following the guidance in the wiki you can scope associations at the point of edit. But what about when you're making a new version of a nested object.
In this case it would be amazing to have access to binding[:parent] (bad name) to allow us to scope attributes based on the parent object, if set.
I've looked through the wiki and the codebase and couldn't see how this could be done, but presumably if I'm in an edit view it should be possible?
When using
accepts_nested_attributes_for
to help streamline adding multiple related models it would often be of benefit to be able to limit some options based on the "parent" model.Following the guidance in the wiki you can scope associations at the point of edit. But what about when you're making a new version of a nested object.
In this case it would be amazing to have access to
binding[:parent]
(bad name) to allow us to scope attributes based on the parent object, if set.I've looked through the wiki and the codebase and couldn't see how this could be done, but presumably if I'm in an edit view it should be possible?