Use reverse_merge on Label#issues_count and Label#merge_requests_count

parent da940792
...@@ -128,13 +128,13 @@ class Label < ActiveRecord::Base ...@@ -128,13 +128,13 @@ class Label < ActiveRecord::Base
end end
def issues_count(user, params = {}) def issues_count(user, params = {})
IssuesFinder.new(user, { label_name: title, scope: 'all' }.merge(params)) IssuesFinder.new(user, params.reverse_merge(label_name: title, scope: 'all'))
.execute .execute
.count .count
end end
def merge_requests_count(user, params = {}) def merge_requests_count(user, params = {})
MergeRequestsFinder.new(user, { label_name: title, scope: 'all' }.merge(params)) MergeRequestsFinder.new(user, params.reverse_merge(label_name: title, scope: 'all'))
.execute .execute
.count .count
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment