debian-mirror-gitlab/app/controllers/concerns/merge_requests_action.rb

24 lines
569 B
Ruby
Raw Normal View History

2015-12-23 02:04:40 +05:30
module MergeRequestsAction
extend ActiveSupport::Concern
2016-09-13 17:45:13 +05:30
include IssuableCollections
2015-12-23 02:04:40 +05:30
2018-03-17 18:26:18 +05:30
# rubocop:disable Gitlab/ModuleWithInstanceVariables
2015-12-23 02:04:40 +05:30
def merge_requests
2018-03-17 18:26:18 +05:30
@merge_requests = issuables_collection.page(params[:page])
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
@issuable_meta_data = issuable_meta_data(@merge_requests, collection_type)
2017-08-17 22:00:37 +05:30
end
2018-03-17 18:26:18 +05:30
# rubocop:enable Gitlab/ModuleWithInstanceVariables
2017-08-17 22:00:37 +05:30
private
2018-03-27 19:54:05 +05:30
def finder_type
(super if defined?(super)) ||
(MergeRequestsFinder if action_name == 'merge_requests')
end
2017-08-17 22:00:37 +05:30
def filter_params
super.merge(non_archived: true)
2015-12-23 02:04:40 +05:30
end
end