module Sequel::Plugins::SingleTableInheritance::InstanceMethods
Private Instance Methods
_before_validation()
click to toggle source
Set the sti_key column based on the sti_key_map.
Calls superclass method
# File lib/sequel/plugins/single_table_inheritance.rb, line 221 def _before_validation if new? && !self[model.sti_key] set_column_value("#{model.sti_key}=", model.sti_key_chooser.call(self)) end super end