pluck_each 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: a808f819a95611a329a5a724924b41ff62e6bbb7
4
- data.tar.gz: d2c9cc635521e5ffd1fbc5e8f09c9dcf23d3a2c1
3
+ metadata.gz: 590090a4b024b581987c5189c8d33f7705fe9deb
4
+ data.tar.gz: b7902f329e25ff1a5590fdd5dcd8f757a441113f
5
5
  SHA512:
6
- metadata.gz: 0c72e5d7bef5021a2d9563fea25c94f9abbdd78f7c6ec2b497134a3d66816df7e902fe8b7efe9ae4817819ad379bbcf44cc4b16d0ba9c54bdac7e2031967b38f
7
- data.tar.gz: d332a5c55fa5a6d969172d908e13f50e1f5c810d95cd64a146ebdf326201aeb406b180e5627cfa624fa722598e6393638271434befe8dee501521b71373ee451
6
+ metadata.gz: 1686ceb57958906c293d0330f248bea630d921cc913bc7eeb2a3d508386b5421f27e52ebaee8f7524d73a944fa8d2cf952ac41b628ef4340966e33744843fd3c
7
+ data.tar.gz: f55c93814f73276331c515794f6863bc2634dee3558fc43b73f8e5191f6adb85d0a3a451b2dd31b3d434d216ceabb9a99f1c763da8d9f9bdf2128ab2a743fc23
@@ -52,7 +52,13 @@ module ActiveRecord
52
52
  yield batch
53
53
 
54
54
  break if batch.size < batch_size
55
- batch_relation = relation.where(arel_attribute(primary_key).gt(primary_key_offset))
55
+
56
+ # some relations don't have arel_attribute, need to figure that out
57
+ if respond_to?(:arel_attribute)
58
+ batch_relation = relation.where(arel_attribute(primary_key).gt(primary_key_offset))
59
+ else
60
+ batch_relation = relation.where("#{primary_key} > ?", primary_key_offset)
61
+ end
56
62
  end
57
63
  end
58
64
  end
@@ -1,3 +1,3 @@
1
1
  module PluckEach
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluck_each
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dewitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-29 00:00:00.000000000 Z
11
+ date: 2016-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  requirements: []
148
148
  rubyforge_project:
149
- rubygems_version: 2.5.1
149
+ rubygems_version: 2.2.2
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: pluck_each and plucK_in_batches ... should behave like find_each and find_in_batches