SchemaPlus / schema_associations

ActiveRecord extension that automatically (DRY) creates associations based on the schema
Other
46 stars 8 forks source link

Can't run migrations from scratch when accepts_nested_attributes_for is in place #21

Open fonsecajavier opened 8 years ago

fonsecajavier commented 8 years ago

accepts_nested_attributes_for tries to find the corresponding association, which is non-existent when DB schema is empty and migrations are just about to be run.

For that reason, it throws an error such as ArgumentError: No association found for name some_association'. Has it been defined yet?

What's the best workaround for this problem?