active_record_custom_preloader 0.4.1 → 0.4.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: cb12633dd33dca10db8ef101811d6b0350e901c1
4
- data.tar.gz: 52588c79fe6e7e7f6c5912279a65105aa90d5176
3
+ metadata.gz: a3ae2d7473982e7d6c8a0acb437c9035639b612a
4
+ data.tar.gz: 569cdbd12ef58432b9ec7943483a1ecc0e674b53
5
5
  SHA512:
6
- metadata.gz: e874ed99f795a7c9be7857a94367f1ae1c8dc3bf6dbedf23479312f6b5cf0e546b99096649cef2e6e05055bdf90d590681ae77a64e7e0acb2ff3d937cb4205a3
7
- data.tar.gz: d864d39edffb975976425713865d97b4c30323ec46dde3ef21526352d4bf5678773ee091d79a52e6825822ff6bd2baa718d0bb4e90aa9a33e7147b51b618798a
6
+ metadata.gz: 739c08fcfd37f34beade62def759197b85ca34f64751aa0ee860b5b843689353cfb7ebc9e134b97d9807db78d410274e537275483a65396eeae6988df96ec1c8
7
+ data.tar.gz: b30be1a80b7fc0c691fca81178754dcad5674abd3dd1b05f54e9a0f118179b445196023892c00c69bc8de61bc334a3217088e559b8f966a36bcdda0654cea361
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordCustomPreloader
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
@@ -78,7 +78,7 @@ module ActiveRecordCustomPreloader
78
78
  keys.size.times { conditions.push(condition_part) }
79
79
  condition_sql = conditions.map { |condition| "(#{condition})" }.join(' OR ')
80
80
  condition_bindings = keys.flatten
81
- return associations_scope.none if condition_sql.blank? || condition_bindings.empty?
81
+ return {} if condition_sql.blank? || condition_bindings.empty?
82
82
  associations = associations_scope.where(condition_sql, *condition_bindings).to_a
83
83
  associations.group_by(&method(:association_foreign_keys))
84
84
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_custom_preloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-14 00:00:00.000000000 Z
11
+ date: 2019-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport