diff options
author | Peter Kozak <spag@golwen.net> | 2013-04-29 15:11:47 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-04-29 15:11:47 +0200 |
commit | d181daa525a730cc46c942845e5e2168858b7ef3 (patch) | |
tree | 1b21cdecec15727b279899d0648aeb2f19b32a4e /app/helpers | |
parent | 165d746547658d63ad80ed6a7c781629c29be5ea (diff) |
sort_descending fixed
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9334f7d..b74fa27 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -21,7 +21,8 @@ module ApplicationHelper def sortable(column, title) link_class = (column.to_s == sort_column.to_s) ? "sort_descending #{sort_descending}" : nil - link_to title, {:sort => column, :desc => !!(!sort_descending && column), :type => @type}, {:class => link_class} + desc = (column.to_s == sort_column.to_s) ? !!(!sort_descending && column) : nil + link_to title, {:sort => column, :desc => desc, :type => @type}, {:class => link_class} end end |