Skip to content

Commit

Permalink
Association manipulation: only mark children changed if owned
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisandreae committed Jun 19, 2019
1 parent 640f081 commit 5460280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/view_model/active_record/association_manipulation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def delete_associated(association_name, associated_id, type: nil, deserialize_co
association.delete(child_vm.model)
end

self.referenced_children_changed!
self.referenced_children_changed! if association_data.owned?

final_changes = self.clear_changes!

Expand Down

0 comments on commit 5460280

Please sign in to comment.