Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Store location before redirecting in unauthorized no-user situation

  • Loading branch information...
commit 2512bb9f02352ca4bb40e820503ba8cc5b180f44 1 parent 39f19c8
Ryan Bigg radar authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  core/lib/spree/core/controller_helpers.rb
1  core/lib/spree/core/controller_helpers.rb
View
@@ -72,6 +72,7 @@ def unauthorized
flash.now[:error] = t(:authorization_failure)
render 'spree/shared/unauthorized', :layout => '/spree/layouts/spree_application', :status => 401
else
+ store_location
url = respond_to?(:spree_login_path) ? spree_login_path : root_path
redirect_to url
end
Please sign in to comment.
Something went wrong with that request. Please try again.