solidus_core 2.8.2 → 2.8.3

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: 5b97bcb067eec1433b2f01d45c66c881e4029bba591ca53a3e3a9118f14392cb
4
- data.tar.gz: 11de3f68e6f50ae439477ddf23b21f62f7200e7ad90172116e054215e34ebfb9
3
+ metadata.gz: 42c525de0b0430c5fe1eb14d2d3261a4f3252372a060d1fb4f7a4d0b0ae47e1a
4
+ data.tar.gz: 9a0cf5c511c9e74d86178572a505f5bc7228a5c6e1596aca217356525984be8d
5
5
  SHA512:
6
- metadata.gz: 59b2593c7b3f0b12ae9a6b1eed82ff49f2f753733452a4d9cbf0ef3e7ef42498ae213070336c22dfbbb1c363be7a108855ea00f9019594690fd2c4def752b3f7
7
- data.tar.gz: 9060ad03693075e534b219f75d423de322569e25f806c702be946920e0b981503bfb8c417d498ff75094cf3a0396415d1f5b48d21497d85ead39cfc8eac99388
6
+ metadata.gz: aacc059f964c7a0f57c562f2e81a44c6bff43f7ed28dd89f07e1fc37f9ef401f64ca944d8f4dcec7fe7963cf0ce85b106d95fdaf500377c99f8f0e6b8f1898d5
7
+ data.tar.gz: 2c0ced8e5424e5130e43c7b4e710f9d02080805fe7198f74ee0c37fb50ebb70378752823663f80b6d59312166393ad780bde83f9a24f065a20efe12b9e481314
@@ -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.8.2"
5
+ "2.8.3"
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.8.2
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-25 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