diff options
-rw-r--r-- | app/helpers/application_helper.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b74fa27..7171fbb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -20,6 +20,9 @@ module ApplicationHelper end def sortable(column, title) + if !defined?(sort_descending) + return title + end link_class = (column.to_s == sort_column.to_s) ? "sort_descending #{sort_descending}" : nil desc = (column.to_s == sort_column.to_s) ? !!(!sort_descending && column) : nil link_to title, {:sort => column, :desc => desc, :type => @type}, {:class => link_class} |