Module: Changes::RecordChanges::Base::Config

Defined in:
lib/record_changes/base.rb

Instance Method Summary collapse

Instance Method Details

#record_changesObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/record_changes/base.rb', line 13

def record_changes

  # This is where arbitrary code goes that you want to 
  # add to the class that declared "acts_as_widget"
  
  has_many :resource_changes, :as => :logged_resource, :class_name => 'Changes::ResourceChange', :dependent => :destroy
  before_save :identify_changes

  include Changes::RecordChanges::Base::InstanceMethods
end