Public Instance methods
before_validation()
Set the sti_key column based on the sti_key_map.
[show source]
# File lib/sequel/plugins/single_table_inheritance.rb 265 def before_validation 266 if new? && model.sti_key && !self[model.sti_key] 267 set_column_value("#{model.sti_key}=", model.sti_key_chooser.call(self)) 268 end 269 super 270 end