Merge branch 'avoid-api-helper-call' into 'master'

Avoid helper call with default parameters

The helpers can ultimately be removed when the issue API uses the Grape DSL.

See merge request !7649
This commit is contained in:
Rémy Coutable 2016-11-22 12:58:43 +00:00
commit c111ba6a76

View file

@ -59,7 +59,7 @@ module API
else merge_requests
end
merge_requests = merge_requests.reorder(issuable_order_by => issuable_sort)
merge_requests = merge_requests.reorder(params[:order_by] => params[:sort])
present paginate(merge_requests), with: Entities::MergeRequest, current_user: current_user, project: user_project
end