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



56
57
58
59
60
61
62
63
64
# File 'lib/temporal_tables/temporal_class.rb', line 56

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_nameObject



52
53
54
# File 'lib/temporal_tables/temporal_class.rb', line 52

def sti_name
	super.sub /History$/, ""
end