activerecord-collections 0.0.18 → 0.0.19
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4104d52b255567a6d3cd51cb81d468277ccd9bfc
|
4
|
+
data.tar.gz: 79c9a5ffe65b546579fc3eb0a2f1e61d188485bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88398faa6910b656103e76eb0c06f9e2a9ba6a2f6aa72b0f20ff013501f2df99df364c1f7273546587ed677a5987e5fc143333d3cd6237fe873e6055648474f7
|
7
|
+
data.tar.gz: 5de4df32a24b064eb2aafdad2018525e009c5531d574c11fabbebef28dbe90a6d4a7b143756fbf03c5b302aac3dcd09a2a1245fff2cbfd9bad2f269323719230
|
@@ -37,7 +37,10 @@ module ActiveRecord
|
|
37
37
|
|
38
38
|
def collection
|
39
39
|
# do this with a hash so that we don't cause the relation query to execute
|
40
|
-
kollektion.from_hash(values_hash)
|
40
|
+
c = kollektion.from_hash(values_hash)
|
41
|
+
# TODO do we even need to do from_hash here? can we just create a new from_relation method instead that re-uses the same relation if we're already loaded?
|
42
|
+
c.instance_variable_set(:@relation, self) if loaded?
|
43
|
+
c
|
41
44
|
end
|
42
45
|
alias_method :to_collection, :collection
|
43
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-collections
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rebec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|