Fix the direction assignment
This commit is contained in:
committed by
Javi Martín
parent
e88acb8905
commit
0fe9ea08c3
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user