final styling of table sorting

This commit is contained in:
Pfingstfrosch
2020-05-31 17:02:34 +02:00
parent ad85619ccc
commit 1a94f5919d
4 changed files with 18 additions and 3 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
module FavoritesHelper
def sortable(title, column)
direction = column == sort_column && sort_direction == 'asc' ? 'desc' : 'asc'
link_to title, :sort => column, :direction => direction
link_to :sort => column, :direction => direction do
content_tag(:div, title) + sorting_arrow(column)
end
end
def sorting_arrow(column)