Method: Eloqua::RemoteObject#update

Defined in:
lib/eloqua/remote_object.rb

#updateObject



111
112
113
114
115
116
117
118
119
120
121
# File 'lib/eloqua/remote_object.rb', line 111

def update
  run_callbacks :update do
    update_attributes = changed.inject({}) do |map, attr|
      map[attr] = send(attr.to_sym)
      map
    end
    attrs = convert_attribute_values(update_attributes, :export)
    attrs = reverse_map_attributes(attrs)
    self.class.update_object(self.attributes[primary_key].to_i, attrs)
  end
end