diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-11-24 11:17:42 +0100 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-18 13:17:51 +0100 |
commit | 0d1922dd7c08eb098390199af3bc7a3e92812a60 (patch) | |
tree | 5cc4a280458a11dd775bf50c78a951a9860b4ca8 /app/models/merge_request.rb | |
parent | 4a10c813e726d09216c534bb0ad0ae50a0400259 (diff) | |
download | gitlab-ce-0d1922dd7c08eb098390199af3bc7a3e92812a60.tar.gz |
Passing an argument to force an association to reload is now deprecated
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 8052a54c504..6f5ea6e29ab 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -48,8 +48,8 @@ class MergeRequest < ActiveRecord::Base # is the inverse of MergeRequest#merge_request_diff, which means it may not be # the latest diff, because we could have loaded any diff from this particular # MR. If we haven't already loaded a diff, then it's fine to load the latest. - def merge_request_diff(*args) - fallback = latest_merge_request_diff if args.empty? && !association(:merge_request_diff).loaded? + def merge_request_diff + fallback = latest_merge_request_diff unless association(:merge_request_diff).loaded? fallback || super end @@ -620,10 +620,6 @@ class MergeRequest < ActiveRecord::Base end end - def reload_merge_request_diff - merge_request_diff(true) - end - def viewable_diffs @viewable_diffs ||= merge_request_diffs.viewable.to_a end |