activerecord-collections 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30bfecdfccd0daf5210318a0a0b0ba38552b78d1
4
- data.tar.gz: 1fc500acc90fa0467dc711b6991a79d5d5408a66
3
+ metadata.gz: 0d82df13bf116718055700ca2c6e5ac38822bc1e
4
+ data.tar.gz: 6ab953c834c0eeea548bb42489fb65f7e4acc44d
5
5
  SHA512:
6
- metadata.gz: 0e29769f0a1122a146425847b98ba2aff294a3a40d2a9c84959d12a0a0fbcf977431b209cb6692345f9b472c16252d60be0d176c8697aba6ef20de874bf7635a
7
- data.tar.gz: e74a2a642cf76911383b0cd20760716d4968a9f852d1656c38a49ea43355693a9f0018adf5c285f2234cb4636319883dd114a560ff8ff6d43e6b5763acdb1ab4
6
+ metadata.gz: 277865f754c3ecfa851b060c43dc4cce68d5ae5e23f41bcb294b6499c726820928f06cd76cd02f04001e434fb24376f10b9660a6182d099af3fcd6c1c6a82516
7
+ data.tar.gz: 196da9b376e13ff8074b6c1c5e7bc8b4e79de781346d7fc929f6b07a996630ff7f4c90a25c846e649a2af691fc36fb11de2a4018a538bcda5eb307fcbd60bd49
@@ -75,8 +75,8 @@ module ActiveRecord
75
75
 
76
76
  def batchify!(btch, bs)
77
77
  @is_batched = true
78
- limit!(bs)
79
- offset!((btch - 1) * bs)
78
+ limit!(bs.to_i)
79
+ offset!((btch.to_i - 1) * bs.to_i)
80
80
  end
81
81
 
82
82
  def total_batches
@@ -33,8 +33,8 @@ module ActiveRecord
33
33
  end
34
34
 
35
35
  def paginate!(pg, pp)
36
- limit!(pp)
37
- offset!((pg - 1) * pp)
36
+ limit!(pp.to_i)
37
+ offset!((pg.to_i - 1) * pp.to_i)
38
38
  end
39
39
 
40
40
  def total_pages
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Collections
3
- VERSION = '0.0.7'
3
+ VERSION = '0.0.8'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-collections
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec