Sha256: 4d9b0f78337823a6b426063e1c3990105f898b49f98628a01cf7f454358baccd
Contents?: true
Size: 559 Bytes
Versions: 1
Compression:
Stored size: 559 Bytes
Contents
module CiviCrm module Actions module Update def update(attrs = {}) attrs = attrs.reverse_merge(changes.transform_values(&:last)) params = { 'entity' => self.class.entity_class_name, 'action' => 'create', 'id' => id }.merge(attrs) response = CiviCrm::Client.request(:post, params) refresh_from(response.first.to_hash) @previously_changed = changes @changed_attributes.clear self end def save update() end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
civicrm-1.1.0 | lib/civicrm/actions/update.rb |