From f7cfaf06ad625485ed4ee5b2be4248f5a3cf239e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 7 Feb 2015 09:08:54 +0000 Subject: Sort helper undefined to_a for string (#18817). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@13970 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/sort_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers') 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 -- cgit v1.2.3