Displaying 1 result from an estimated 1 matches for "without_audit".
2006 Sep 04
2
"include" versus "extend" - what's the difference
...le
after_create :audit_create
after_update :audit_update
before_destroy :audit_destroy
after_save :clear_changed_attributes
end
end
end
module InstanceMethods
# Temporarily turns off auditing while saving.
def save_without_auditing
without_auditing do
save
end
end
# Returns an array of attribute keys that are audited. See
non_audited_columns
def audited_attributes
self.attributes.keys.select { |k|
!self.class.non_audited_columns.include?(k) }
end
#...