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.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.audit_classObject Also known as: audit_model



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

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

.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



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

def config
  yield(self)
end

.storeObject



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

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