summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-03 15:09:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-03 15:09:06 +0000
commit9e5624c362ad2a38c52d1b36a4f01bd051114486 (patch)
treeebb92eade002931ad986090db6f6078610c030ac
parent35321d938bfbad15f0cfd3fb32f10b68e7e6cac9 (diff)
downloadredmine-9e5624c362ad2a38c52d1b36a4f01bd051114486.tar.gz
redmine-9e5624c362ad2a38c52d1b36a4f01bd051114486.zip
Prevent "can't convert nil into String" error when :sort_order param is not present.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1410 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/sort_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb
index f16ff3c7d..9ca5c11bd 100644
--- a/app/helpers/sort_helper.rb
+++ b/app/helpers/sort_helper.rb
@@ -83,7 +83,7 @@ module SortHelper
# Use this to sort the controller's table items collection.
#
def sort_clause()
- session[@sort_name][:key] + ' ' + session[@sort_name][:order]
+ session[@sort_name][:key] + ' ' + (session[@sort_name][:order] || 'ASC')
end
# Returns a link which sorts by the named column.