diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-07 09:08:54 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-07 09:08:54 +0000 |
commit | f7cfaf06ad625485ed4ee5b2be4248f5a3cf239e (patch) | |
tree | 97b84e5544ce44bd12175558703806ac10fe561d /app/helpers | |
parent | 86a329eb8b1c152562992d925174ffdf7e7c541d (diff) | |
download | redmine-f7cfaf06ad625485ed4ee5b2be4248f5a3cf239e.tar.gz redmine-f7cfaf06ad625485ed4ee5b2be4248f5a3cf239e.zip |
Sort helper undefined to_a for string (#18817).
Patch by Ondřej Ezr.
git-svn-id: http://svn.redmine.org/redmine/trunk@13970 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/sort_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb index da74aeac2..c9da9bd10 100644 --- a/app/helpers/sort_helper.rb +++ b/app/helpers/sort_helper.rb @@ -123,7 +123,7 @@ module SortHelper def normalize! @criteria ||= [] - @criteria = @criteria.collect {|s| s = s.to_a; [s.first, (s.last == false || s.last == 'desc') ? false : true]} + @criteria = @criteria.collect {|s| s = Array(s); [s.first, (s.last == false || s.last == 'desc') ? false : true]} @criteria = @criteria.select {|k,o| @available_criteria.has_key?(k)} if @available_criteria @criteria.slice!(3) self |