Prevent abstract ActiveRecord instantiation
Having an sort of mixed STI + Abstract? Want to block the base class to be instantiable? Simple add in validates_presence for type column in the base class. :)
Written by Trung Lê
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#