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
Written by Diogo Biazus
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#