module Sequel::Plugins::SingleTableInheritance::InstanceMethods

def before_create

Set the sti_key column based on the sti_key_map.
def before_create
  send("#{model.sti_key}=", model.sti_key_map[model]) unless self[model.sti_key]
  super
end