Permalink
Browse files

Move get_taxonomies method out of Spree::Core::ControllerHelpers and …

…into Spree::ProductsHelper

This method is only used on the home page, and is not reference from any controller inside of Spree
  • Loading branch information...
radar committed Jul 24, 2012
1 parent 0490934 commit 980348a05cc0fa26918d60d4108e238b9ba1248c
Showing with 4 additions and 5 deletions.
  1. +4 −0 core/app/helpers/spree/products_helper.rb
  2. +0 −5 core/lib/spree/core/controller_helpers.rb
@@ -29,5 +29,9 @@ def line_item_description(variant)
t(:product_has_no_description)
end
end
def get_taxonomies
@taxonomies ||= Spree::Taxonomy.includes(:root => :children)
end
end
end
@@ -12,7 +12,6 @@ def self.included(base)
helper_method :title
helper_method :title=
helper_method :accurate_title
helper_method :get_taxonomies
helper_method :current_order
helper_method :try_spree_current_user
@@ -142,10 +141,6 @@ def redirect_back_or_default(default)
session["user_return_to"] = nil
end
def get_taxonomies
@taxonomies ||= Spree::Taxonomy.includes(:root => :children).joins(:root)
end
def set_user_language
locale = session[:locale]
locale ||= Spree::Config[:default_locale] unless Spree::Config[:default_locale].blank?

0 comments on commit 980348a

Please sign in to comment.