class AuditLog

Public Instance Methods

audit_user() click to toggle source

Obtains the `current_user` based upon the `:audited_current_user_method' value set in the audited model, either via defaults or via :user_method config options

# NOTE! this allows overriding the default value on a per audited model

# File lib/sequel/plugins/audited.rb, line 29
def audit_user
  m = Kernel.const_get(associated_type)
  m.send(m.audited_current_user_method) || send(m.audited_current_user_method)
end
before_validation() click to toggle source
Calls superclass method
# File lib/sequel/plugins/audited.rb, line 14
def before_validation
  # grab the current user
  if u = audit_user
    self.modifier = u
  end

  super
end