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 +4 -4
- data/lib/civicrm/actions/update.rb +8 -3
- data/lib/civicrm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7ae37ef3255235169095074a0525669b89c1d46
|
4
|
+
data.tar.gz: 13d57be0bc35d87eacb482c30f1a8a44c240fc32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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
|
data/lib/civicrm/version.rb
CHANGED