spree_frontend 3.7.1 → 3.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78748638de87f5893e6567f93920eb13ce5128ef2e36df71d3a91604e15ea497
4
- data.tar.gz: fffd0d902b87da7411dca1259878aefacc6a7956cd5325249d583a6c5ed52091
3
+ metadata.gz: 3b9e453172ec6d5c6adc5b6fcfa90e2f5251376eb8620581607e1bef5960dcdb
4
+ data.tar.gz: a1cc5a5ded60f8b1469bd73a47e83e642853af60c5a27c4bc5bb08fd4451d8fd
5
5
  SHA512:
6
- metadata.gz: 96cf0483583bfc1ba1db4fd630b008502015e9e8ddddd8125095d6229d71ec3671c5cfa3275b28e6d498d931577c4625ef41424fd22e13b7a744e17ddcd263af
7
- data.tar.gz: 282bb1e33233a9286c5760ee11df89d9c0e9b945acad8918abd9c4c281756f1c5ae07d9f26ed7a87425b77a302b635dafe741b6766f969c78e2560be9c20283e
6
+ metadata.gz: 72cb624e0f05b12fac0556042847a7d4b1787e52954a58e3e5a4504c768245499c69d04bfcb678e41b3dd9d545a5e2021644fc0dde7d8c78308d07645a5ec355
7
+ data.tar.gz: 9abb62c098c56382d56e8ed772dc161616477907da0e0a378acb45a591c1cdb7bc6a1c0db495bb22a9d07bb5d59e8ba7c17f4c3f3a976bc6984a3de51f3afc3d
@@ -4,12 +4,12 @@ module Spree
4
4
  # that we can use configurations as well as make it easier for end users to override this determination. One idea is
5
5
  # to show the most popular products for a particular taxon (that is an exercise left to the developer.)
6
6
  def taxon_preview(taxon, max = 4)
7
- products = taxon.active_products.select('DISTINCT (spree_products.id), spree_products.*, spree_products_taxons.position').limit(max)
7
+ products = taxon.active_products.distinct.select('spree_products.*, spree_products_taxons.position').limit(max)
8
8
  if products.size < max
9
9
  products_arel = Spree::Product.arel_table
10
- taxon.descendants.each do |taxon|
10
+ taxon.descendants.each do |child|
11
11
  to_get = max - products.length
12
- products += taxon.active_products.select('DISTINCT (spree_products.id), spree_products.*, spree_products_taxons.position').where(products_arel[:id].not_in(products.map(&:id))).limit(to_get)
12
+ products += child.active_products.distinct.select('spree_products.*, spree_products_taxons.position').where(products_arel[:id].not_in(products.map(&:id))).limit(to_get)
13
13
  break if products.size >= max
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.1
4
+ version: 3.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-01 00:00:00.000000000 Z
11
+ date: 2019-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.7.1
19
+ version: 3.7.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.7.1
26
+ version: 3.7.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.7.1
33
+ version: 3.7.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.7.1
40
+ version: 3.7.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap-sass
43
43
  requirement: !ruby/object:Gem::Requirement