From: Jean-Philippe Lang Date: Sat, 3 May 2008 15:09:06 +0000 (+0000) Subject: Prevent "can't convert nil into String" error when :sort_order param is not present. X-Git-Tag: 0.8.0-RC1~549 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9e5624c362ad2a38c52d1b36a4f01bd051114486;p=redmine.git 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 --- 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.