Module: Audited

Defined in:
lib/audited.rb,
lib/audited/audit.rb,
lib/audited/auditor.rb,
lib/audited/railtie.rb,
lib/audited/sweeper.rb,
lib/audited/version.rb,
lib/audited/rspec_matchers.rb

Defined Under Namespace

Modules: Auditor, RspecMatchers Classes: Audit, Railtie, Sweeper, YAMLIfTextColumnType

Constant Summary collapse

VERSION =
"5.4.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.audit_classObject Also known as: audit_model



17
18
19
20
21
22
# File 'lib/audited.rb', line 17

def audit_class
  # The audit_class is set as String in the initializer. It can not be constantized during initialization and must
  # be constantized at runtime. See https://github.com/collectiveidea/audited/issues/608
  @audit_class = @audit_class.safe_constantize if @audit_class.is_a?(String)
  @audit_class ||= Audited::Audit
end

.auditing_enabledObject

Returns the value of attribute auditing_enabled.



8
9
10
# File 'lib/audited.rb', line 8

def auditing_enabled
  @auditing_enabled
end

.current_user_methodObject

Returns the value of attribute current_user_method.



8
9
10
# File 'lib/audited.rb', line 8

def current_user_method
  @current_user_method
end

.ignored_attributesObject

Returns the value of attribute ignored_attributes.



8
9
10
# File 'lib/audited.rb', line 8

def ignored_attributes
  @ignored_attributes
end

.ignored_default_callbacksObject

Returns the value of attribute ignored_default_callbacks.



8
9
10
# File 'lib/audited.rb', line 8

def ignored_default_callbacks
  @ignored_default_callbacks
end

.max_auditsObject

Returns the value of attribute max_audits.



8
9
10
# File 'lib/audited.rb', line 8

def max_audits
  @max_audits
end

.store_synthesized_enumsObject

Returns the value of attribute store_synthesized_enums.



8
9
10
# File 'lib/audited.rb', line 8

def store_synthesized_enums
  @store_synthesized_enums
end

Class Method Details

.config {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Audited)

    the object that the method was called on



33
34
35
# File 'lib/audited.rb', line 33

def config
  yield(self)
end

.storeObject



29
30
31
# File 'lib/audited.rb', line 29

def store
  RequestStore.store[:audited_store] ||= {}
end