class DirtyHistoryRecord
Attributes
performing_manual_update[RW]
Public Instance Methods
action_timestamp()
click to toggle source
# File lib/dirty_history/dirty_history_record.rb, line 44 def action_timestamp # use revised_created_at field to update the timestamp for # the dirty history action while retaining data integrity self[:revised_created_at] || self[:created_at] end
Private Instance Methods
val_to_col_type(attribute)
click to toggle source
# File lib/dirty_history/dirty_history_record.rb, line 52 def val_to_col_type attribute val_as_string = self[attribute] return nil if val_as_string.nil? case self[:column_type].to_sym when :integer, :boolean val_as_string.to_i when :decimal, :float val_as_string.to_f when :datetime Time.parse val_as_string when :date Date.parse val_as_string else # :string, :text val_as_string end end