module CIA::Auditable
Public Class Methods
included(base)
click to toggle source
# File lib/cia/auditable.rb, line 3 def self.included(base) base.class_attribute :audited_attributes, :audited_attribute_options, :audited_attributes_callbacks_added base.send :extend, ClassMethods end
Public Instance Methods
cia_changes()
click to toggle source
# File lib/cia/auditable.rb, line 8 def cia_changes if respond_to?(:has_changes_to_save?) if has_changes_to_save? changes_to_save else saved_changes end else changes end end
cia_previous_changes(changes=nil)
click to toggle source
# File lib/cia/auditable.rb, line 20 def cia_previous_changes(changes=nil) if changes @cia_previous_changes = changes else old, @cia_previous_changes = @cia_previous_changes, nil old end end