From eb6bba52e3bf9e2f945803a8b9d48923df0e0fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 10 Jan 2019 15:09:34 +0100 Subject: [PATCH] Simplify code The string inside `params[:direction]` should already use lowercase characters. --- app/helpers/budget_investments_helper.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/helpers/budget_investments_helper.rb b/app/helpers/budget_investments_helper.rb index 419efe6b4..ee5aad93c 100644 --- a/app/helpers/budget_investments_helper.rb +++ b/app/helpers/budget_investments_helper.rb @@ -4,9 +4,7 @@ module BudgetInvestmentsHelper end def link_to_investments_sorted_by(column) - current_direction = params[:direction].downcase if params[:direction] - - direction = set_direction(current_direction) + direction = set_direction(params[:direction]) icon = set_sorting_icon(direction, column) translation = t("admin.budget_investments.index.list.#{column}")