summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index de4d677..9334f7d 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -19,4 +19,9 @@ module ApplicationHelper
end
end
+ 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}
+ end
+
end