Permalink
Browse files

Controllers always responds to spree_current_user

Due to method definition inside ControllerHelpers
  • Loading branch information...
1 parent 2512bb9 commit c86e12a84324960e3878ddcd65fe677687a36359 @radar radar committed May 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/app/controllers/spree/products_controller.rb
@@ -34,7 +34,7 @@ def accurate_title
end
def load_product
- if respond_to?(:spree_current_user) && spree_current_user.try(:has_spree_role?, "admin")
+ if spree_current_user.try(:has_spree_role?, "admin")
@product = Product.find_by_permalink!(params[:id])
else
@product = Product.active.find_by_permalink!(params[:id])

0 comments on commit c86e12a

Please sign in to comment.