Sha256: 829d27b83c84254f53c7ebaff82020719dd985311eee7a93c1c7c005703345e7

Contents?: true

Size: 433 Bytes

Versions: 36

Compression:

Stored size: 433 Bytes

Contents

module EffectiveLogging
  module SetCurrentUser
    module ActionController

      # Add me to your ApplicationController
      # around_action :set_effective_logging_current_user

      def set_effective_logging_current_user
        EffectiveLogging.current_user = current_user

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

    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
effective_logging-4.3.1 lib/effective_logging/set_current_user.rb
effective_logging-4.3.0 lib/effective_logging/set_current_user.rb
effective_logging-4.2.0 lib/effective_logging/set_current_user.rb
effective_logging-4.1.3 lib/effective_logging/set_current_user.rb
effective_logging-4.1.2 lib/effective_logging/set_current_user.rb
effective_logging-4.1.1 lib/effective_logging/set_current_user.rb
effective_logging-4.1.0 lib/effective_logging/set_current_user.rb
effective_logging-4.0.0 lib/effective_logging/set_current_user.rb
effective_logging-3.5.4 lib/effective_logging/set_current_user.rb
effective_logging-3.5.3 lib/effective_logging/set_current_user.rb
effective_logging-3.5.2 lib/effective_logging/set_current_user.rb
effective_logging-3.5.1 lib/effective_logging/set_current_user.rb
effective_logging-3.5.0 lib/effective_logging/set_current_user.rb
effective_logging-3.4.1 lib/effective_logging/set_current_user.rb
effective_logging-3.4.0 lib/effective_logging/set_current_user.rb
effective_logging-3.3.0 lib/effective_logging/set_current_user.rb
effective_logging-3.2.3 lib/effective_logging/set_current_user.rb
effective_logging-3.2.2 lib/effective_logging/set_current_user.rb
effective_logging-3.2.1 lib/effective_logging/set_current_user.rb
effective_logging-3.2.0 lib/effective_logging/set_current_user.rb