Sha256: 4bdd1abc9cf174c615dce3dd083530ed1fdf7070dcc12c55ca72a3d4a6677def

Contents?: true

Size: 323 Bytes

Versions: 151

Compression:

Stored size: 323 Bytes

Contents

# frozen_string_literal: true

module Motor
  module CurrentUserMethod
    def current_user
      @current_user ||=
        if defined?(current_admin)
          current_admin
        elsif defined?(current_admin_user)
          current_admin_user
        elsif defined?(super)
          super
        end
    end
  end
end

Version data entries

151 entries across 151 versions & 2 rubygems

Version Path
motor-admin-0.3.17 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.16 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.15 app/controllers/concerns/motor/current_user_method.rb
mafia-admin-0.3.18 app/controllers/concerns/motor/current_user_method.rb
mafia-admin-0.3.17 app/controllers/concerns/motor/current_user_method.rb
mafia-admin-0.3.16 app/controllers/concerns/motor/current_user_method.rb
mafia-admin-0.3.15 app/controllers/concerns/motor/current_user_method.rb
mafia-admin-0.3.14 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.14 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.13 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.12 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.11 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.10 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.9 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.8 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.7 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.6 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.5 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.4 app/controllers/concerns/motor/current_user_method.rb
motor-admin-0.3.3 app/controllers/concerns/motor/current_user_method.rb