diff options
Diffstat (limited to 'app/models/merge_request_diff.rb')
-rw-r--r-- | app/models/merge_request_diff.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index d2b3ca753b1..bd94c0ad30e 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -66,7 +66,7 @@ class MergeRequestDiff < ApplicationRecord joins(:merge_request).where(merge_requests: { target_project_id: project_id }) end - scope :recent, -> { order(id: :desc).limit(100) } + scope :recent, -> (limit = 100) { order(id: :desc).limit(limit) } scope :files_in_database, -> do where(stored_externally: [false, nil]).where(arel_table[:files_count].gt(0)) |