query_helper 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
2
  SHA256:
3
- metadata.gz: 761535bdbebea924ac3d4ab1ed900f50a047f2e79ed5c2121b5f0eecf0327388
4
- data.tar.gz: bb55e4554e416e2729d35c2fc1091d65726bde73fc1db93e192baf1275237bb0
3
+ metadata.gz: 66a48754e9a1e5fcf794039299fc18c477bdda5cc334e09988e24a73cd5dc0b7
4
+ data.tar.gz: 2f1aa69978a6b1ccffca16f82b7617e32bbb5e819460782ae566de439a694043
5
5
  SHA512:
6
- metadata.gz: 0ba6ddb3222dba240810b0df6e1bc1025a2510d4b00c06430fc91c8786dbacc3d06df83f7986766a1d0755988550fdc44396fa1357c7c1cd2accc54edc904345
7
- data.tar.gz: 33c4194f5bd8da5abdf8e7f2e78f0fcd9d84e5184c89ac3e926b8435e2a125f8b0f4428532fbfe24f6288e20f4c8520731c88720f2261788738f16048d8f0a49
6
+ metadata.gz: 0b09be775d91bb839e8c15da2d166bc33ac6bbb1ed46b00f2bd6a52962d06999383797776411c26e86a28e082221fdb37f28562aa0d8d28f91087bf3971ab6f7
7
+ data.tar.gz: 77ec774a1a2a49b4ac90deb066321488ee7a4a2884bc149107b664a54eb31a955d109eeef9ce6c8a22b61afd66ffc06889382d50db8081e69b1b1432c6aa28b9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_helper (0.2.17)
4
+ query_helper (0.2.18)
5
5
  activerecord (> 5)
6
6
  activesupport (> 5)
7
7
 
@@ -184,7 +184,7 @@ class QueryHelper
184
184
  results_per_page = @per_page || count
185
185
  results_page = @page || 1
186
186
 
187
- total_pages = (count/(results_per_page.nonzero? || 1).to_f).ceil
187
+ total_pages = (count.to_i/(results_per_page.nonzero? || 1).to_f).ceil
188
188
  next_page = results_page + 1 if results_page.between?(1, total_pages - 1)
189
189
  previous_page = results_page - 1 if results_page.between?(2, total_pages)
190
190
  first_page = results_page == 1
@@ -1,3 +1,3 @@
1
1
  class QueryHelper
2
- VERSION = "0.2.17"
2
+ VERSION = "0.2.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_helper
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
  - Evan McDaniel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-28 00:00:00.000000000 Z
11
+ date: 2020-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler