replication 0.3.0 → 0.3.1

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: fd5a01b4b8a01177c8ebac63ee886a3addcbd23a
4
- data.tar.gz: 63febe92d691600d7d74581e60cd094170f33cde
3
+ metadata.gz: ad90fb7e58586f707553c38c7b26d1853eb9434c
4
+ data.tar.gz: 929db885b57e51daff8924fa2dab390061946a2a
5
5
  SHA512:
6
- metadata.gz: 943df247a131e72c686d2aeea3d5fcf19a0e884b2611b29538a0f81d2c2e7492dd79450cb0518d91bee22b1f447878d5954508bb3c0a84aab322fed945cc8daf
7
- data.tar.gz: 6e17a74b7940d84c570cb6d4c003bddbf0ae73f8467f633f61fa723399f0ccb76082fec643b9c5c275177524ff9a37cb5f93773a42f4d1eacb94c38eb8b95995
6
+ metadata.gz: 1defc33796d5d0499286c12ac84cc25c738449387f1ace480a03dacec1d36b7a9818b7ddf73d0f97ee0d550724b09d3a1f4e96a699809327174e1955fc5efd5b
7
+ data.tar.gz: cfaaabb3d51e20e8b3810ebed626f3af27369a4ee16b2a4e45ffe4cc1456b02156b1e415ecc64834a900e46936df255d0b2d729637ad037e7e5980cfdbb14652
@@ -22,7 +22,7 @@ module Replication
22
22
  attributes_from_association.delete('id')
23
23
  attributes_from_association.delete(association_reflection.foreign_key)
24
24
  @strand_attributes.merge!({
25
- "#{a}_attributes".to_sym => association_model.select(*attributes_from_association).to_a.map(&:serializable_hash)
25
+ "#{a}_attributes".to_sym => self.send(association_reflection.name).select(*attributes_from_association).to_a.map(&:serializable_hash)
26
26
  })
27
27
  end
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module Replication
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -10,7 +10,11 @@ class Replication::Modules::AssociationTest < ActiveSupport::TestCase
10
10
  organism.save
11
11
  strand = organism.unwound(name: 'Monkey with a wrench')
12
12
 
13
+ Tooling.create(tool: Tool.first) # create unassociated tooling
14
+
13
15
  assert_includes strand.pairs, :toolings_attributes
16
+ assert_equal 1, strand.pairs[:toolings_attributes].length
17
+ assert_equal 2, Tooling.count
14
18
  end
15
19
  end
16
20
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replication
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
  - Rodrigo DeAlmeida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-08 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler