1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-29 03:39:38 +00:00

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
This commit is contained in:
Jean-Philippe Lang 2015-02-07 09:08:54 +00:00
parent 86a329eb8b
commit f7cfaf06ad

View File

@ -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