Skip to content

Commit a5dcf9b

Browse files
committed
Merge pull request #171 from hashrabbit/fix-updating
Fix NoMethodError when updating existing records
2 parents 0cb79ef + dbd588c commit a5dcf9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/intercom/api_operations/save.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def create(params = PARAMS_NOT_PROVIDED)
2121
def save(object)
2222
collection_name = Utils.resource_class_to_collection_name(collection_class)
2323
if id_present?(object) && !posted_updates?(object)
24-
response = @client.put("/#{collection_name}/#{id}", object.to_submittable_hash)
24+
response = @client.put("/#{collection_name}/#{object.id}", object.to_submittable_hash)
2525
else
2626
response = @client.post("/#{collection_name}", object.to_submittable_hash.merge(identity_hash(object)))
2727
end

0 commit comments

Comments
 (0)