SchemaPlus / schema_associations

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

Dependent associations #24

Open eliaszica opened 7 years ago

eliaszica commented 7 years ago

It seems that using has_many <class>, dependent: destroy in a parent model inhibits schema_associations from creating the inverse associations. As a workaround I'm using foreign_key: { on_delete: :cascade } in the child table migration file, but documentation says that the gem won't clobber additional definitions.

Please let me know if you need some additional information.

Regards,

Elias