module Ardm::Ar::Dirty

Public Instance Methods

dirty?() click to toggle source
# File lib/ardm/ar/dirty.rb, line 4
def dirty?
  changed?
end
dirty_attributes() click to toggle source
# File lib/ardm/ar/dirty.rb, line 8
def dirty_attributes
  changes.inject({}) do |memo, (attr, val)|
    property = properties[attr]
    memo[property] = val
    memo
  end
end
method_missing(meth, *args, &block) click to toggle source
Calls superclass method
# File lib/ardm/ar/dirty.rb, line 16
def method_missing(meth, *args, &block)
  if meth.to_s =~ /^([\w_]+)_dirty\?$/
    send("#{$1}_changed?", *args, &block)
  else
    super
  end
end