solidus_core 2.7.1 → 2.7.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_core might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b353f76018590b3096aec9635da22d277a64c23a01e231fe0aa3960dace50c2
4
- data.tar.gz: e19bfadcb93dac8ab98f673a410e83181c6ef96e4df54a84a2aaea6c1fee977f
3
+ metadata.gz: 58fc9826b5f9c9a2fd48509544a0a15b7ee6aac8b914c704f2906851fcbe658f
4
+ data.tar.gz: 50437dd8a03e88e07d2f83041179076e7294bacb98fab11c178085a002ec3a90
5
5
  SHA512:
6
- metadata.gz: ba3e6b540d932e49d9fb43fadfe73c070593d9894e355ddfa494534820ae5e39a24d97e049d180cdcc70cf524235c3fa482a486effeb013eb9ff9c24b13886ac
7
- data.tar.gz: 0f1b179013b7252310ac174d88ab6a5f723e3c2dcbb2e59f13de4ba2b1f184058c00ce7dc61132930608ad8b619bfc936b5c5756a66ff18f2d6ab8f3e180dbbe
6
+ metadata.gz: 4cd8daac9a994195acf74958dbadbe74ab0c515a5bb712eca2e97ead8b02690ab1218522696a628f13814ab825cb97a3dfe99404e0d07812a235e5b5987b76d8
7
+ data.tar.gz: 3700a96155cf19803eb8200762358a22c1d15b106a643ceda69d4031d461895bd1caffc2309731d2348c7051262430c706e85f196fc910887e1040f92f2fca32
@@ -7,12 +7,12 @@ module Spree
7
7
  # to show the most popular products for a particular taxon (that is an exercise left to the developer.)
8
8
  def taxon_preview(taxon, max = 4)
9
9
  price_scope = Spree::Price.where(current_pricing_options.search_arguments)
10
- products = taxon.active_products.joins(:prices).merge(price_scope).select("DISTINCT (spree_products.id), spree_products.*, spree_products_taxons.position").limit(max)
10
+ products = taxon.active_products.joins(:prices).merge(price_scope).select("DISTINCT spree_products.*, spree_products_taxons.position").limit(max)
11
11
  if products.size < max
12
12
  products_arel = Spree::Product.arel_table
13
13
  taxon.descendants.each do |descendent_taxon|
14
14
  to_get = max - products.length
15
- products += descendent_taxon.active_products.joins(:prices).merge(price_scope).select("DISTINCT (spree_products.id), spree_products.*, spree_products_taxons.position").where(products_arel[:id].not_in(products.map(&:id))).limit(to_get)
15
+ products += descendent_taxon.active_products.joins(:prices).merge(price_scope).select("DISTINCT spree_products.*, spree_products_taxons.position").where(products_arel[:id].not_in(products.map(&:id))).limit(to_get)
16
16
  break if products.size >= max
17
17
  end
18
18
  end
@@ -63,9 +63,10 @@ module Spree
63
63
  #
64
64
  # SELECT COUNT(*) ...
65
65
  add_search_scope :in_taxon do |taxon|
66
- includes(:classifications).
67
- where("spree_products_taxons.taxon_id" => taxon.self_and_descendants.pluck(:id)).
68
- order(Spree::Classification.arel_table[:position].asc)
66
+ includes(:classifications)
67
+ .where('spree_products_taxons.taxon_id' => taxon.self_and_descendants.pluck(:id))
68
+ .select(Spree::Classification.arel_table[:position])
69
+ .order(Spree::Classification.arel_table[:position].asc)
69
70
  end
70
71
 
71
72
  # This scope selects products in all taxons AND all its descendants
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Spree
4
4
  def self.solidus_version
5
- "2.7.1"
5
+ "2.7.2"
6
6
  end
7
7
 
8
8
  def self.solidus_gem_version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1
4
+ version: 2.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-07 00:00:00.000000000 Z
11
+ date: 2019-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer