I have a model Admin::Books, and I’d like to set an accepts_nested_attributes_for field in the :users table. I thought perhaps it’d be something like:
accepts_nested_attributes_for :admin_books
but I get the following:
No association found for name
`admin_books’. Has it been
defined yet?
So, any suggestions on how to access a ‘moduled’ model from a non-moduled one?
Define the association like this:
Then define the
accepts_nested_attributes_forlike this:This way, Rails will look to the association to get the correct class for the ANAF objects.