I have a model and I am using Single Table Inheritance. This has a type
column in my database which is populated with the string of the class name.
Should I validate this column?
Options:
validates :type, presence: true
validates :type, inclusion: {in: [Class1.to_s, Class2.to_s]}
Since ActiveRecord
handles the type
field you don't need to write extra validations on this field.