class Audited::Sweeper

Constants

STORED_DATA

Public Instance Methods

around(controller) { || ... } click to toggle source
# File lib/audited/sweeper.rb, line 11
def around(controller)
  self.controller = controller
  STORED_DATA.each { |k,m| store[k] = send(m) }
  yield
ensure
  self.controller = nil
  STORED_DATA.keys.each { |k| store.delete(k) }
end
controller() click to toggle source
# File lib/audited/sweeper.rb, line 32
def controller
  store[:current_controller]
end
controller=(value) click to toggle source
# File lib/audited/sweeper.rb, line 36
def controller=(value)
  store[:current_controller] = value
end
current_user() click to toggle source
# File lib/audited/sweeper.rb, line 20
def current_user
  lambda { controller.send(Audited.current_user_method) if controller.respond_to?(Audited.current_user_method, true) }
end
remote_ip() click to toggle source
# File lib/audited/sweeper.rb, line 24
def remote_ip
  controller.try(:request).try(:remote_ip)
end
request_uuid() click to toggle source
# File lib/audited/sweeper.rb, line 28
def request_uuid
  controller.try(:request).try(:uuid)
end