Permalink
Browse files

Redirect to either spree_login_path (if it exists) or root_path for s…

…tore_location
  • Loading branch information...
1 parent 459a8d5 commit ad9b3df6f4fa0b5246b1c0c2e6515de48ef7acc7 @radar radar committed May 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/lib/spree/core/controller_helpers.rb
@@ -71,8 +71,8 @@ def unauthorized
flash.now[:error] = t(:authorization_failure)
render 'spree/shared/unauthorized', :layout => '/spree/layouts/spree_application', :status => 401
else
- store_location
- redirect_to spree_login_path and return
+ url = respond_to?(:spree_login_path) ? spree_login_path : root_path
+ redirect_to url
end
end
format.xml do

0 comments on commit ad9b3df

Please sign in to comment.