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 +4 -4
- data/lib/active_record/collection.rb +5 -1
- data/lib/active_record/collections/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90413291270816c9e336b6bd84f6186cf4cbf4d8
|
4
|
+
data.tar.gz: 14211182826f221348fe208ab53309d14dcba7b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
|