Module CollectiveIdea::Acts::Audited::SingletonMethods
In: lib/acts_as_audited.rb

Methods

Public Instance methods

All audit operations during the block are recorded as being made by user. This is not model specific, the method is a convenience wrapper around Audit.as_user.

[Source]

     # File lib/acts_as_audited.rb, line 269
269:         def audit_as( user, &block )
270:           Audit.as_user( user, &block )
271:         end

Returns an array of columns that are audited. See non_audited_columns

[Source]

     # File lib/acts_as_audited.rb, line 242
242:         def audited_columns
243:           self.columns.select { |c| !non_audited_columns.include?(c.name) }
244:         end

[Source]

     # File lib/acts_as_audited.rb, line 258
258:         def disable_auditing
259:           write_inheritable_attribute :auditing_enabled, false
260:         end

[Source]

     # File lib/acts_as_audited.rb, line 262
262:         def enable_auditing
263:           write_inheritable_attribute :auditing_enabled, true
264:         end

Executes the block with auditing disabled.

  Foo.without_auditing do
    @foo.save
  end

[Source]

     # File lib/acts_as_audited.rb, line 252
252:         def without_auditing(&block)
253:           auditing_was_enabled = auditing_enabled
254:           disable_auditing
255:           returning(block.call) { enable_auditing if auditing_was_enabled }
256:         end

[Validate]