Skip to content

Commit

Permalink
Standardize
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed May 10, 2023
1 parent 13ca78c commit 466051a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/madmin/sort_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module Madmin
module SortHelper
def sortable(column, title, options = {})
matching_column = (column.to_s == sort_column)
direction = sort_direction == "asc" ? "desc" : "asc"
direction = (sort_direction == "asc") ? "desc" : "asc"

link_to resource.index_path(sort: column, direction: direction), options do
concat title
if matching_column
concat " "
concat tag.i(sort_direction == "asc" ? "▲" : "▼")
concat tag.i((sort_direction == "asc") ? "▲" : "▼")
end
end
end
Expand Down

0 comments on commit 466051a

Please sign in to comment.