Commit f43cb6e7 authored by Nermin Vehabovic's avatar Nermin Vehabovic

Fixed: Warnings from static code analysis

parent ff671366
...@@ -397,13 +397,11 @@ module API ...@@ -397,13 +397,11 @@ module API
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
def order_options_with_tie_breaker def order_options_with_tie_breaker
{params[:order_by] => params[:sort]}.tap do |order| order_options = { params[:order_by] => params[:sort] }
order['id'] ||= 'desc' order_options['id'] ||= 'desc'
end order_options
end end
# rubocop: enable CodeReuse/ActiveRecord
def project_finder_params def project_finder_params
finder_params = { without_deleted: true } finder_params = { without_deleted: true }
......
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