spree_api 3.3.0.rc3 → 3.3.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/spree/api/v1/products_controller.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de3b495ec71c30e2095e05056516bbc666fd2ecc
|
4
|
+
data.tar.gz: eb55bed9ef487a6f00da582242c14ff63a7093bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba7b94dbd722420aa8503c6d62f84df3e5e406f8d84d3ecdf20b11705722282c23925ee7b96515291d6f1ec1c6a33cb4caf851772e4a425a7adfa3fbb3ace1ab
|
7
|
+
data.tar.gz: 54780b7c5af156fb46e61a68d482d12b4cfd713fb2d7039a8679f34463521e4976928741b25f81919748da4459925d1aa0bbb0daf86e4f99e55a187b09a5d5e3
|
@@ -7,10 +7,10 @@ module Spree
|
|
7
7
|
if params[:ids]
|
8
8
|
@products = product_scope.where(id: params[:ids].split(",").flatten)
|
9
9
|
else
|
10
|
-
@products = product_scope.ransack(params[:q]).result
|
10
|
+
@products = product_scope.ransack(params[:q]).result(distinct: true).select("#{Spree::Product.table_name}.id AS count_column, #{Spree::Product.table_name}.*")
|
11
11
|
end
|
12
12
|
|
13
|
-
@products = @products.
|
13
|
+
@products = @products.page(params[:page]).per(params[:per_page])
|
14
14
|
expires_in 15.minutes, public: true
|
15
15
|
headers['Surrogate-Control'] = "max-age=#{15.minutes}"
|
16
16
|
respond_with(@products)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.0.
|
4
|
+
version: 3.3.0.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.3.0.
|
19
|
+
version: 3.3.0.rc4
|
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.3.0.
|
26
|
+
version: 3.3.0.rc4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rabl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
234
|
version: 1.3.1
|
235
235
|
requirements: []
|
236
236
|
rubyforge_project:
|
237
|
-
rubygems_version: 2.6.
|
237
|
+
rubygems_version: 2.6.12
|
238
238
|
signing_key:
|
239
239
|
specification_version: 4
|
240
240
|
summary: Spree's API
|