Module: TemporalTables::TemporalClass::STIWithHistory
- Defined in:
- lib/temporal_tables/temporal_class.rb
Instance Method Summary collapse
Instance Method Details
#find_sti_class(type_name) ⇒ Object
59 60 61 62 63 64 65 66 67 |
# File 'lib/temporal_tables/temporal_class.rb', line 59 def find_sti_class(type_name) type_name += 'History' unless type_name =~ /History\Z/ begin super rescue ActiveRecord::SubclassNotFound superclass.send(:find_sti_class, type_name) end end |
#sti_name ⇒ Object
55 56 57 |
# File 'lib/temporal_tables/temporal_class.rb', line 55 def sti_name super.sub(/History$/, '') end |