Skip to content
Snippets Groups Projects
Commit b84b32ed authored by Jasper Maes's avatar Jasper Maes
Browse files

Passing an argument to force an association to reload is now deprecated

parent 242baf12
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -313,7 +313,8 @@ class MergeRequestDiff < ActiveRecord::Base
 
# merge_request_diff_commits.reload is preferred way to reload associated
# objects but it returns cached result for some reason in this case
commits = merge_request_diff_commits(true)
# we can circumvent that by specifying that we need an uncached reload
commits = self.class.uncached { merge_request_diff_commits.reload }
self.commits_count = commits.size
end
 
Loading
Loading
---
title: Passing an argument to force an association to reload is now deprecated
merge_request: 23334
author: Jasper Maes
type: other
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment