activerecord-collections 0.0.18 → 0.0.19

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: 6ba595a345da0edaeb2b73b499afcfe68b7f9d16
4
- data.tar.gz: 8edff512f058ddcc11ee156c54a1c31eef5f1df7
3
+ metadata.gz: 4104d52b255567a6d3cd51cb81d468277ccd9bfc
4
+ data.tar.gz: 79c9a5ffe65b546579fc3eb0a2f1e61d188485bf
5
5
  SHA512:
6
- metadata.gz: 04c0a06a56fd2c505fe47d77de708f1680ceec30f4c5264102d568b39a00515133bbad03278deafe2ce7ee9e55932306196e948c983fbe79a89cbc1913d583a4
7
- data.tar.gz: f4865bd68cd6227415455d40319ddfc87a1507c5b59b06e5c4965986ee2a25fbcd73dc3ba8aff8f89071b1c4e863e0bc0716779db8899d853e45c6e729e21c2a
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
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Collections
3
- VERSION = '0.0.18'
3
+ VERSION = '0.0.19'
4
4
  end
5
5
  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.18
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-03-02 00:00:00.000000000 Z
11
+ date: 2015-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord