gitlab-org--gitlab-foss/app/controllers/concerns/merge_requests_action.rb
Jacopo 4d26ab28a9 Fix Archived project merge requests add to group's Merge Requests
counter

This is done by:
 - Extending the IssuableFinder adding the non_archived option to the params
 - Overriding the #filter_params in the MergeRequestsAction
 - Passing the non_archived param in the nav/_group.html.haml navbar
   partial from the groups/merge_requests.html.haml
2016-12-05 18:06:36 +01:00

17 lines
335 B
Ruby

module MergeRequestsAction
extend ActiveSupport::Concern
include IssuableCollections
def merge_requests
@label = merge_requests_finder.labels.first
@merge_requests = merge_requests_collection
.page(params[:page])
end
private
def filter_params
super.merge(non_archived: true)
end
end