activerecord-collections 0.0.24 → 0.0.25

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: f6a1d8087898abadc4007581ab714424b15e797d
4
- data.tar.gz: 4bd38a8e29b7e491e37b9337b7ee88d6c61042a0
3
+ metadata.gz: 90413291270816c9e336b6bd84f6186cf4cbf4d8
4
+ data.tar.gz: 14211182826f221348fe208ab53309d14dcba7b4
5
5
  SHA512:
6
- metadata.gz: 7a3a224370a7e042c1d1a184db1e38b70e0c93cd1614b1a5ad090d04b585218c9c2bd3a52e553f1432186a558cddcca062a2d119baa34e16e1df62c57090d921
7
- data.tar.gz: 39574217740a6c075d46f413232d50020bdeb17a35c2ec88d0a03a0bd3710ce1ddfce0cf7d0bc03c241600e2bad99a0101b08f8c7347d583106165724c87cc72
6
+ metadata.gz: accb3a04fb6d89895211cb10e9e8cf98e4d622091b2ec5e080dbee1356f710f467472ca39d2ccdfcaf9a98af7ee8c5fd1e23d3bcdca86b3b90c5f63d367c4d3d
7
+ data.tar.gz: f80335585daaccd9d94b74b128d4de923f9b9af9466ea1aa6497fba397064107c0fa5dd9e8ef3e067377d3aab389e90bba08d937afb53be8ae02694720eb2689
@@ -45,7 +45,11 @@ module ActiveRecord
45
45
  rescue
46
46
  parent = klass.ancestors[1]
47
47
  return nil if parent.name == 'ActiveRecord::Collection'
48
- parent.try(:collectable) || infer_collectable(parent)
48
+ if ActiveRecord::Collection::COLLECTABLES.has_key?(parent.name)
49
+ ActiveRecord::Collection::COLLECTABLES[parent.name].constantize
50
+ else
51
+ infer_collectable(parent)
52
+ end
49
53
  end
50
54
  end
51
55
 
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Collections
3
- VERSION = '0.0.24'
3
+ VERSION = '0.0.25'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-collections
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec