jit_preloader 0.0.1 → 0.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9209e8e03dd7ebf7543435a61c98452f229b98ad
|
4
|
+
data.tar.gz: 608e6a970d068893eb71fcc3ebba489e77663cd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a88b2f6b198e0b72dd6e8bbaf68cc9b0a9397cadd6bc4e76f39ede7b959873a9ad185af56fb2681cf60a412b5b87b92c9fe6daf175f4ac4f7e98ede9b4c2e639
|
7
|
+
data.tar.gz: f8b58d50d67bb629b068d388f67571e0be8de13934982d1c708fcfa8ea079f10c60ded555c09cdbc2f422e426ab38ae62865c4a144fda00ce91cea47ac5c5446
|
@@ -14,7 +14,7 @@ class ActiveRecord::Associations::Preloader::CollectionAssociation
|
|
14
14
|
# end
|
15
15
|
|
16
16
|
def preload(preloader)
|
17
|
-
return unless reflection.scope.nil? || reflection.scope.arity == 0
|
17
|
+
return unless (reflection.scope.nil? || reflection.scope.arity == 0) && klass.ancestors.include?(ActiveRecord::Base)
|
18
18
|
all_records = []
|
19
19
|
associated_records_by_owner(preloader).each do |owner, records|
|
20
20
|
association = owner.association(reflection.name)
|
@@ -14,7 +14,7 @@ class ActiveRecord::Associations::Preloader::SingularAssociation
|
|
14
14
|
# end
|
15
15
|
|
16
16
|
def preload(preloader)
|
17
|
-
return unless reflection.scope.nil? || reflection.scope.arity == 0
|
17
|
+
return unless (reflection.scope.nil? || reflection.scope.arity == 0) && klass.ancestors.include?(ActiveRecord::Base)
|
18
18
|
all_records = []
|
19
19
|
|
20
20
|
associated_records_by_owner(preloader).each do |owner, associated_records|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jit_preloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle d'Oliveira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|