diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-08 18:50:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-08 18:50:15 +0000 |
commit | 3976e2d15dd0ea7ffdb6ceff8910fcaae0b6ed67 (patch) | |
tree | bdc98d7af34adaa7ed8720b0d90927a0a58a4687 /app/models/query.rb | |
parent | aa127ebd4e8e89827dfe3fe397d87fae9c6d3209 (diff) | |
download | redmine-3976e2d15dd0ea7ffdb6ceff8910fcaae0b6ed67.tar.gz redmine-3976e2d15dd0ea7ffdb6ceff8910fcaae0b6ed67.zip |
Tests broken with ruby1.8.6 (#9751).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8128 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 3e2fec29d..fad42fcb2 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -363,7 +363,8 @@ class Query < ActiveRecord::Base ).collect {|cf| QueryCustomFieldColumn.new(cf) } if User.current.allowed_to?(:view_time_entries, project, :global => true) - index = @available_columns.index {|column| column.name == :estimated_hours} + index = nil + @available_columns.each_with_index {|column, i| index = i if column.name == :estimated_hours} index = (index ? index + 1 : -1) # insert the column after estimated_hours or at the end @available_columns.insert index, QueryColumn.new(:spent_hours, |