Module: DynamicModelActiveRecordExtensions::ClassMethods
- Defined in:
- lib/dynamic_model_active_record_extensions.rb
Instance Method Summary collapse
-
#sti_model? ⇒ Boolean
if this class has a type attribute, then it is a model which is using single table inheritance.
-
#sti_parent_class ⇒ Object
for creating routes which are based on the parent class.
Instance Method Details
#sti_model? ⇒ Boolean
if this class has a type attribute, then it is a model which is using single table inheritance
19 20 21 |
# File 'lib/dynamic_model_active_record_extensions.rb', line 19 def sti_model? attribute_names.include? "type" end |
#sti_parent_class ⇒ Object
for creating routes which are based on the parent class
24 25 26 |
# File 'lib/dynamic_model_active_record_extensions.rb', line 24 def sti_parent_class self.parent end |