Sha256: b9e933bb2891b8f918d3824bb3c7abee9308afd718b3d673bee41133f7340ce2

Contents?: true

Size: 307 Bytes

Versions: 7

Compression:

Stored size: 307 Bytes

Contents

# For the API
ActionController::Metal.class_eval do
  def spree_current_user
    @spree_current_user ||=  if defined? env
                               env['warden'].user
                             else
                               request.env['warden'].user
                             end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_auth_devise-4.0.0.rc1 app/controllers/metal_decorator.rb
spree_auth_devise-3.5.2 app/controllers/metal_decorator.rb
spree_auth_devise-3.5.1 app/controllers/metal_decorator.rb
spree_auth_devise-3.5.0 app/controllers/metal_decorator.rb
spree_auth_devise-3.4.2 app/controllers/metal_decorator.rb
spree_auth_devise-3.4.1 app/controllers/metal_decorator.rb
spree_auth_devise-3.4.0 app/controllers/metal_decorator.rb