Module: MassiveRecord::ORM::SingleTableInheritance::ClassMethods
- Defined in:
- lib/massive_record/orm/single_table_inheritance.rb
Instance Method Summary collapse
Instance Method Details
#do_find(*args) ⇒ Object
25 26 27 28 |
# File 'lib/massive_record/orm/single_table_inheritance.rb', line 25 def do_find(*args) result = super single_table_inheritance_enabled? ? ensure_only_class_or_subclass_of_self_are_returned(result) : result end |
#first(*args) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/massive_record/orm/single_table_inheritance.rb', line 30 def first(*args) if base_class == self super else raise FirstUnsupported.new("Sorry, first() on '#{self}' (sub class of the base class '#{base_class}') is unsupported due to unable to efficiently filter this through Thrift.") end end |