Permalink
Browse files

Store location before redirecting in unauthorized no-user situation

  • Loading branch information...
1 parent 39f19c8 commit 2512bb9f02352ca4bb40e820503ba8cc5b180f44 @radar radar committed May 30, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 core/lib/spree/core/controller_helpers.rb
@@ -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

0 comments on commit 2512bb9

Please sign in to comment.