Module: Relational::Audit::ControllerMethods::InstanceMethods

Defined in:
lib/relational/controller_methods.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
# File 'lib/relational/controller_methods.rb', line 7

def self.included(base)
  base.before_filter :audit_set_changes_by
end

Instance Method Details

#audit_set_changes_byObject



11
12
13
14
# File 'lib/relational/controller_methods.rb', line 11

def audit_set_changes_by
  ::Relational::Audit.audit_changes_by = current_user if defined? current_user
  ::Relational::Audit.audit_transaction_id = SecureRandom.hex(10)
end