Monday, 18 January 2010

Note to Self

If you want a rails model to accept nested attributes, it's really important to have
accepts_nested_attributes_for 
in your model definition.
Otherwise you get the rather cryptic error:
ActiveRecord::AssociationTypeMismatch in YourController#create    
YourDependentModel(#-615375688) expected, got Array(#-605176048)

No comments:

Post a Comment