predictive_load 0.3.0 → 0.3.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/predictive_load.rb +10 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c588660d2fac16be90c9c518cf38777a5a88908e
4
- data.tar.gz: a5019c17bd022a04f8a805637ca2d3a9583dacd1
3
+ metadata.gz: 06c683b9447d34decb31d5c7364b83e05896a0d5
4
+ data.tar.gz: 60aabeabaf9889446277fabfb26b581a9a5bba3f
5
5
  SHA512:
6
- metadata.gz: 415799244ca6a53685d163174d6ee846a5749c68899d4b91571a36e878771882c05269581b1e55a631044916617d53e2222b261a99f1c25c7ec0b103b5833ef7
7
- data.tar.gz: 41ba67603699ab634d0d788c1a90aad5df3d18f5a304a11f213b0a657d3c80d3e9ed9edd5ef260617c3ee36f82f0c8df45c65dc812dab4ab291fcb9272bb1297
6
+ metadata.gz: 59b7d697564804716960c66ead83b077c7c07acb3d26b9afa42e6c886a6a13b94e166fc872136625bf3dec869945eff01a9fdec922f52a667294331723cb441b
7
+ data.tar.gz: 88d0b749741eca4d134ba75d1797f0c1985de83634c0385ea6558bf9a0528610e845614bedef753edb54a53028aebf68cf6ab15fa7c653698a86630dfbf2735e
@@ -1,4 +1,13 @@
1
1
  module PredictiveLoad
2
2
  end
3
3
 
4
- ActiveRecord::Associations::Builder::Association.valid_options << :predictive_load
4
+ klasses = [ActiveRecord::Associations::Builder::Association]
5
+
6
+ if ActiveRecord::VERSION::MAJOR == 3
7
+ # when belongs_to etc is loaded before us it already made a copy of valid_options
8
+ klasses.concat ActiveRecord::Associations::Builder::Association.descendants
9
+ end
10
+
11
+ klasses.each do |klass|
12
+ klass.valid_options << :predictive_load
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: predictive_load
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Chapweske