Last Updated: February 25, 2016
·
785
· diogob

Use schema_associations to to make your ActiveRecord models more DRY

You should use foreign key constraints in your database to keep your data's integrity. ActiveRecord models can infer some simple associations using the database data dictionary and append them in your model logic without having to write extra code using https://github.com/lomba/schema_associations