diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-13 23:37:15 +0300 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-13 23:38:51 +0300 |
commit | 921bc753bf7dc85dd0c3083bacb7f633ea2b51c9 (patch) | |
tree | 5035f0de6f8cf75cb1447a50e41b6b4778be1ef8 | |
parent | 07e079e8dd336e76986ad001fce79ab9babb00b0 (diff) |
Fix deprecation: Passing conditions to delete_all is deprecated
-rw-r--r-- | changelogs/unreleased/deprecated-delete-all-params.yml | 5 | ||||
-rw-r--r-- | spec/models/merge_request_diff_spec.rb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/deprecated-delete-all-params.yml b/changelogs/unreleased/deprecated-delete-all-params.yml new file mode 100644 index 00000000000..e23fe92a738 --- /dev/null +++ b/changelogs/unreleased/deprecated-delete-all-params.yml @@ -0,0 +1,5 @@ +--- +title: 'Fix deprecation: Passing conditions to delete_all is deprecated' +merge_request: 23817 +author: Jasper Maes +type: other diff --git a/spec/models/merge_request_diff_spec.rb b/spec/models/merge_request_diff_spec.rb index cbe60b3a4a5..33e984dc399 100644 --- a/spec/models/merge_request_diff_spec.rb +++ b/spec/models/merge_request_diff_spec.rb @@ -105,7 +105,7 @@ describe MergeRequestDiff do context 'when the raw diffs are empty' do before do - MergeRequestDiffFile.delete_all(merge_request_diff_id: diff_with_commits.id) + MergeRequestDiffFile.where(merge_request_diff_id: diff_with_commits.id).delete_all end it 'returns an empty DiffCollection' do |