module Hindsight::InstanceMethods
Private Instance Methods
increment_version()
click to toggle source
# File lib/hindsight/has_hindsight.rb, line 30 def increment_version self.version += 1 end
init_versioned_record_id()
click to toggle source
# File lib/hindsight/has_hindsight.rb, line 34 def init_versioned_record_id update_column(:versioned_record_id, id) unless versioned_record_id? end
new_record!()
click to toggle source
# File lib/hindsight/has_hindsight.rb, line 25 def new_record! self.id = nil @new_record = true end
prepare_version()
click to toggle source
# File lib/hindsight/has_hindsight.rb, line 20 def prepare_version new_record! increment_version end