Module: MassiveRecord::ORM::SingleTableInheritance
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/massive_record/orm/single_table_inheritance.rb
Defined Under Namespace
Modules: ClassMethods Classes: FirstUnsupported
Instance Method Summary collapse
Instance Method Details
#ensure_proper_type ⇒ Object
75 76 77 78 79 80 81 |
# File 'lib/massive_record/orm/single_table_inheritance.rb', line 75 def ensure_proper_type inheritance_attribute = self.class.inheritance_attribute if respond_to?(inheritance_attribute) && self[inheritance_attribute].blank? && self.class.base_class != self.class self[inheritance_attribute] = self.class.to_s end end |