From 0fe9ea08c36ca917c3d7006837055a0266800d3a Mon Sep 17 00:00:00 2001 From: Anna Anks Nowak Date: Wed, 2 Jan 2019 21:33:20 +0100 Subject: [PATCH] Fix the direction assignment --- app/helpers/budget_investments_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/budget_investments_helper.rb b/app/helpers/budget_investments_helper.rb index e26b4099b..739d1b283 100644 --- a/app/helpers/budget_investments_helper.rb +++ b/app/helpers/budget_investments_helper.rb @@ -8,9 +8,9 @@ module BudgetInvestmentsHelper default_direction = "desc" current_direction = params[:direction].downcase if params[:direction] - direction = current_direction == default_direction ? default_direction : "asc" + direction = current_direction == default_direction ? "asc" : default_direction - icon = direction == default_direction ? "icon-arrow-down" : "icon-arrow-top" + icon = direction == default_direction ? "icon-arrow-top" : "icon-arrow-down" icon = sort_by == params[:sort_by] ? icon : "" translation = t("admin.budget_investments.index.sort_by.#{sort_by}")