solidus_core 2.6.3 → 2.6.4

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: 6cd2f50ef956981c4eea96a103f8b55dacbd4346154398d182b666fa8d9bc481
4
- data.tar.gz: 68e8a3ae5c6ae357056baa0b77c50d7908ee797e4d3f85536bcae32caf5b10d7
3
+ metadata.gz: b3b81a2fffd48fc3f7d19f9d2a1a97508fb87670806a32b846286ad9c776bb3d
4
+ data.tar.gz: 110be3514bd3790c56161fd483fcab60ec9775d47713e775e69e3b771e828f6e
5
5
  SHA512:
6
- metadata.gz: 538ddcf9279c83fd9048f7a773a64b24229beff0e40dd37d247e80b7299cbee41c45a9ce94bf106cfa3230af729f597a1d31272fd4f06b2376ec121b64253885
7
- data.tar.gz: c1acc659d80a20a6caa9e8eb4b32b5dc16be15c7c8cc76a3d216efc06440dd3e06cac13a3cce888836bb5481a5f84a1d449f8f3a3d425b9d92a335ef2ef5bfbd
6
+ metadata.gz: a240cdb0e5706a7185c2c5892d1ce46b7be0731e01069af22377763a980c97926cd162b1ed7b0e28a930673fcca48029c3f43135ddc168f9ca9ac0a31c370798
7
+ data.tar.gz: d5ff58c166cd979378712de1b6b0152889a232cef0b4af0aee111cc0681cc1ad23040b81e5180bf0b3abcbe6e20a029df4b390a0710aefa6a513231621a2b8ea
@@ -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.6.3"
5
+ "2.6.4"
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.6.3
4
+ version: 2.6.4
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-06 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