-
Notifications
You must be signed in to change notification settings - Fork 37
Issues with eager loading #1
Comments
Can you provide sample code to reproduce the problem? |
Additionally, can you confirm this issue is with metawhere, and not metasearch? The emphasis on the view makes it sound more like a metasearch ticket. |
Yes. I had meta_search installed and the error only happens if I add meta_where. Additionally, the problem happens with just meta_where installed. The issue is pretty simple to duplicate. Just create a form with nested_fields on a model that accepts_nested_attributes_for
The error I get here is: But the real problem is that it's returning the wrong class for the object. The class returned is ActiveRecord::Associations::HasManyAssociation instead of the PhoneNumber model |
Thanks for the clarification. I found the problem. There are two solutions at this point:
More details are there. |
I'm having problems with this gem and nested fields. When rails queries the object that's loaded into a fields_for it comes back with the association class instead of the model class.
I think that this may be related to what the fields_for_nested_model function is getting back when it calls object.to_model on the association.
The text was updated successfully, but these errors were encountered: