Module: Changeling::Trackling

Defined in:
lib/changeling/trackling.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'lib/changeling/trackling.rb', line 3

def self.included(base)
  base.after_update :save_logling
end

Instance Method Details

#save_loglingObject



7
8
9
10
11
12
13
# File 'lib/changeling/trackling.rb', line 7

def save_logling
  if self.changes && !self.changes.empty?
    logling = Changeling::Models::Logling.create(self)
  end

  true
end