Module Sequel::Plugins::ClassTableInheritance::InstanceMethods
In: lib/sequel/plugins/class_table_inheritance.rb

Methods

Public Instance methods

Set the cti_key column to the name of the model.

[Source]

     # File lib/sequel/plugins/class_table_inheritance.rb, line 174
174:         def before_create
175:           return false if super == false
176:           send("#{model.cti_key}=", model.name.to_s) if model.cti_key
177:         end

Delete the row from all backing tables, starting from the most recent table and going through all superclasses.

[Source]

     # File lib/sequel/plugins/class_table_inheritance.rb, line 181
181:         def delete
182:           m = model
183:           m.cti_tables.reverse.each do |table|
184:             m.db.from(table).filter(m.primary_key=>pk).delete
185:           end
186:           self
187:         end

[Validate]