Module: EffectiveLogging::SetCurrentUser::ActionController

Defined in:
lib/effective_logging/set_current_user.rb

Instance Method Summary collapse

Instance Method Details

#set_effective_logging_current_userObject

Add me to your ApplicationController around_action :set_effective_logging_current_user


8
9
10
11
12
13
14
15
16
# File 'lib/effective_logging/set_current_user.rb', line 8

def set_effective_logging_current_user
  EffectiveLogging.current_user = current_user

  if block_given?
    retval = yield
    EffectiveLogging.current_user = nil
    retval
  end
end