mincer 0.2.17 → 0.2.18

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
- SHA1:
3
- metadata.gz: 34a35780354d1a3d2c9850f6fa83996366c57485
4
- data.tar.gz: 0e23085677d40f3a96560fd1bab2a90d16b03194
2
+ SHA256:
3
+ metadata.gz: e5d10eccf1fade89b90c3c00a04aa8740a548ff7c4818656cb2569593c3993d7
4
+ data.tar.gz: 898265f01a1e873f60dd2eeede2f5fbec36559bed8386a2681c6bf995178cf8c
5
5
  SHA512:
6
- metadata.gz: add1d84d8e9595801b82e1c906baf72fb9fa33f684cf905927b6a26eaa2a97fef8267466291d4456ed2e285269ab5aca4c7388b85c4707e2b8063b01bf8187fb
7
- data.tar.gz: 5bb7915aa9b8e816a543928f05a26878bd54e2477bea8af9f41560e6e14ef1afc0284bcfdeaba468e4c0961b8bd248746594ba9ac15b525c2922132a4aa9bb19
6
+ metadata.gz: afb5fdc6407cc7aed5b70933ef76710fd2fffdc27af56521ddf34e5214a5340ce51573ced6c3257662914078363ea2c23c6c1ae8ec082d3592712579730553f0
7
+ data.tar.gz: 33e7e42c41ee190f851564cc48ef297c9d388637c10018e72c8f27ec3a7537ba4d70e4620c4b09addc7e99a4525f8c792e392a05d3d6de0faf9816530f8c4e0b
@@ -43,6 +43,9 @@ module Mincer
43
43
  # Query for basic json generation. Ex: [{'id': 1}, {...}]
44
44
  def basic_json_query(root = 'json', meta = false)
45
45
  meta_sql = if meta
46
+ if meta.is_a?(Hash) && meta[:total_count]
47
+ @mincer.relation.instance_variable_set(:@total_count, meta[:total_count])
48
+ end
46
49
  ", #{@mincer.total_pages} AS total_pages, #{@mincer.total_count} AS total_count, #{@mincer.current_page} AS current_page, #{@mincer.limit_value} AS per_page"
47
50
  else
48
51
  ''
@@ -1,7 +1,7 @@
1
1
  module Mincer
2
2
 
3
3
  def self.version
4
- Gem::Version.new '0.2.17'
4
+ Gem::Version.new '0.2.18'
5
5
  end
6
6
 
7
7
  module VERSION #:nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mincer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.17
4
+ version: 0.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Krasinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-11 00:00:00.000000000 Z
11
+ date: 2019-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -195,8 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubyforge_project:
199
- rubygems_version: 2.4.5.1
198
+ rubygems_version: 3.0.1
200
199
  signing_key:
201
200
  specification_version: 4
202
201
  summary: ActiveRecord::Relation wrapper for pagination, order, json, search, cache_digest