diff --git a/Gemfile b/Gemfile index bf1d7da..d2727c7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' -gem 'spree', github: 'spree/spree', :branch => 'master' +gem 'spree', github: 'spree/spree', :branch => '2-3-stable' # Provides basic authentication functionality for testing parts of your engine -gem 'spree_auth_devise', github: "spree/spree_auth_devise", :branch => 'master' +gem 'spree_auth_devise', github: "spree/spree_auth_devise", :branch => '2-3-stable' gemspec diff --git a/app/controllers/spree/home_controller_decorator.rb b/app/controllers/spree/home_controller_decorator.rb index 348ac89..2af67fb 100644 --- a/app/controllers/spree/home_controller_decorator.rb +++ b/app/controllers/spree/home_controller_decorator.rb @@ -1,14 +1,18 @@ Spree::HomeController.class_eval do def index + uniq_item = "DISTINCT (spree_products.id), spree_products.*, spree_products_taxons.position" slider = Spree::Taxon.where(:name => 'Slider').first @slider_products = slider.products.active if slider + @slider_products = @slider_products.select(uniq_item) if @slider_products featured = Spree::Taxon.where(:name => 'Featured').first @featured_products = featured.products.active if featured + @featured_products = @featured_products.select(uniq_item) if @featured_products latest = Spree::Taxon.where(:name => 'Latest').first @latest_products = latest.products.active if latest + @latest_products = @latest_products.select(uniq_item) if @latest_products end end diff --git a/spree_fancy.gemspec b/spree_fancy.gemspec index 33cd091..39accce 100644 --- a/spree_fancy.gemspec +++ b/spree_fancy.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.require_path = 'lib' s.requirements << 'none' - s.add_dependency 'spree_core', '~> 2.3.0.beta' + s.add_dependency 'spree_core', '~> 2.3.0' s.add_dependency 'compass-rails' s.add_dependency 'jquery-ui-rails' s.add_dependency 'deface', '~> 1.0.0rc3'