Skip to content

Commit

Permalink
Merge pull request #1176 from lgebhardt/use_destroy_vs_delete_v0.9
Browse files Browse the repository at this point in the history
Use `destroy` instead of `delete` to ensure callbacks are called
  • Loading branch information
lgebhardt authored Aug 30, 2018
2 parents bb95f67 + 5f8705a commit 464bdd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jsonapi/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def _remove_to_many_link(relationship_type, key, options)

@reload_needed = true
else
@model.public_send(relationship.relation_name(context: @context)).delete(key)
@model.public_send(relationship.relation_name(context: @context)).destroy(key)
end

:completed
Expand Down

0 comments on commit 464bdd1

Please sign in to comment.