restforce-db 0.3.1 → 0.3.2

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: 87281da0196f2998dd5e7bfee3f1b01fa5d44f6c
4
- data.tar.gz: a5a2640154dd6d7f6c695331614558992d8124c5
3
+ metadata.gz: c7271f667addef9ca339a2452d20d4c59889d216
4
+ data.tar.gz: 809ed0792d08ee7504f78e9bf3cc59d9c3ffb2f5
5
5
  SHA512:
6
- metadata.gz: a114a5e6237174834ad2caf96af3dd5aa9666b03f520e9756b18e60b3dec91c2b5ec0d8d30ec47f20fe40d37de0873d0c28c326bf368601d43728a1bea49d47d
7
- data.tar.gz: ca99f08816c51788159bc2a4d966e65e94302ee496f9339d910e77db145a8b50978698d1a5090d6109b808c0dd2d30356fe926f7ab828d0628984df1b4d8a7be
6
+ metadata.gz: f1932d26bd6c8cb70ab2db91927f244f9847fbe1a49bd58255616daf7ee822f1a4228b2a26d045aa81ecea8aae00af09fc6fb9653b728f164dfb509a7ef7ec19
7
+ data.tar.gz: 1609aebd03dfb25bcad99683ab9e390e9decb1125b615ff0414325c4cafbc4addabe846ffb85f9ee74930663fa4f7db86f4684fafa761c9dd354daf371b3e845
@@ -21,8 +21,8 @@ module Restforce
21
21
 
22
22
  record = @record_type.new(attributes.merge(salesforce_id: from_record.id))
23
23
  @mapping.associations.each do |association, lookup|
24
+ associated = record.association(association).build
24
25
  lookup_id = from_record.record.send(lookup)
25
- associated = record.send("build_#{association}")
26
26
  build_association associated, lookup_id
27
27
  end
28
28
  record.save!
@@ -3,7 +3,7 @@ module Restforce
3
3
  # :nodoc:
4
4
  module DB
5
5
 
6
- VERSION = "0.3.1"
6
+ VERSION = "0.3.2"
7
7
 
8
8
  end
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restforce-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Horner