Use schema_validations to make your ActiveRecord classes more DRY
There are many data validations that should be done in database level as well as in model level. You can use https://github.com/lomba/schema_validations to write this validations only in migrations and have them working in your models without having to write extra code.
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#