Module: Sequel::Plugins::ClassTableInheritance::InstanceMethods
- Defined in:
- lib/sequel/plugins/class_table_inheritance.rb
Instance Method Summary collapse
-
#delete ⇒ Object
Delete the row from all backing tables, starting from the most recent table and going through all superclasses.
Instance Method Details
#delete ⇒ Object
Delete the row from all backing tables, starting from the most recent table and going through all superclasses.
244 245 246 247 248 249 250 251 |
# File 'lib/sequel/plugins/class_table_inheritance.rb', line 244 def delete raise Sequel::Error, "can't delete frozen object" if frozen? m = model m.cti_tables.reverse.each do |table| m.db.from(table).filter(m.primary_key=>pk).delete end self end |