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: f7e698f4bfc6d6724f1b11f46b954995085525b7
4
- data.tar.gz: 5e597f8c4289ac459d030d4f1c42f76bbf327d34
3
+ metadata.gz: 9209e8e03dd7ebf7543435a61c98452f229b98ad
4
+ data.tar.gz: 608e6a970d068893eb71fcc3ebba489e77663cd7
5
5
  SHA512:
6
- metadata.gz: 2469c5a0361154980988d9c5bf0aae13842b583051d168656efadf9a21f7fc8379d68c842831cce6e1b4b4d37253fb294ddfe84618f3786f35262459590bf9df
7
- data.tar.gz: 8127d7c2040f18b21664fc11a5062db501d87e378fdbf91b4d327f86819d2a8df36f6c760c3fab0e6dcf79dcc340c71d5f05db62fe01287a20cd6cf720d53fc3
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|
@@ -1,3 +1,3 @@
1
1
  module JitPreloader
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-10-31 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord