gitlab-org--gitlab-foss/app/controllers/concerns/merge_requests_action.rb
Dmitriy Zaporozhets 3cebe9e780
Refactor duplciate code for groups_controller.rb and slack_service/note_message.rb
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-17 11:03:18 +01:00

9 lines
310 B
Ruby

module MergeRequestsAction
extend ActiveSupport::Concern
def merge_requests
@merge_requests = get_merge_requests_collection
@merge_requests = @merge_requests.page(params[:page]).per(ApplicationController::PER_PAGE)
@merge_requests = @merge_requests.preload(:author, :target_project)
end
end