module Hindsight::ActMethod
Public Instance Methods
has_hindsight(options = {})
click to toggle source
# File lib/hindsight/has_hindsight.rb, line 3 def has_hindsight(options = {}) extend Hindsight::ClassMethods include Hindsight::InstanceMethods has_many :versions, :class_name => name, :primary_key => :versioned_record_id, :foreign_key => :versioned_record_id before_save :prepare_version after_create :init_versioned_record_id end