civicrm 1.0.7 → 1.1.0

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: 20c5b696021decdd86453e689e74c3b25ce7dc97
4
- data.tar.gz: 26a68e62ff042a11fcb357e1d27b1ca3b1f676fc
3
+ metadata.gz: a7ae37ef3255235169095074a0525669b89c1d46
4
+ data.tar.gz: 13d57be0bc35d87eacb482c30f1a8a44c240fc32
5
5
  SHA512:
6
- metadata.gz: 31e521a4bef9f022793a1196e8801be59f8f2a54eb36185b92f0732a26524b51a1327c45ccacb3bba9cc421750af730e8b5fe5cc8340a1d390f52893feb54caf
7
- data.tar.gz: 0620007e2f86085cefebce9e12dfe9fa3de221d2e69765dd4f2584eab440ee5b9b5af945f7620e1b459b4f1d741a0e288dad8d8e83384dd882278f10cf5d8a76
6
+ metadata.gz: eab2e0be745d5f3497cf93a67dd468b4d2b39ebbe237de7c131dba9ca7facbf713d822d753d81f0cd0b230811aa5309fb9bcd5bc6ee398607bb126d673c35e14
7
+ data.tar.gz: 0249a5d15d5fb56a4b0bd7f1f4c60ce7b3e601ad165c816907c3704e8e21b91c36ecba27290d000eb01aed737971ebd440de31682b29984c6e8f48440aa652e2
@@ -2,19 +2,24 @@ module CiviCrm
2
2
  module Actions
3
3
  module Update
4
4
  def update(attrs = {})
5
+ attrs = attrs.reverse_merge(changes.transform_values(&:last))
6
+
5
7
  params = {
6
8
  'entity' => self.class.entity_class_name,
7
9
  'action' => 'create',
8
10
  'id' => id
9
- }.merge(attributes).merge(attrs)
11
+ }.merge(attrs)
10
12
 
11
13
  response = CiviCrm::Client.request(:post, params)
12
14
  refresh_from(response.first.to_hash)
13
- end
14
15
 
15
- def save
16
16
  @previously_changed = changes
17
17
  @changed_attributes.clear
18
+
19
+ self
20
+ end
21
+
22
+ def save
18
23
  update()
19
24
  end
20
25
  end
@@ -1,3 +1,3 @@
1
1
  module CiviCrm
2
- VERSION = '1.0.7'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civicrm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Haziev