diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-07-13 12:15:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-07-13 12:15:24 +0000 |
commit | 13bf8dc8bfb43a9c4add53f8a170a42e66058233 (patch) | |
tree | 92cb38831893e93b005529adb9d2aa36df53f25c /app/controllers | |
parent | 01f259be0d56c5477b766107bfd6d56d3b249bc5 (diff) | |
download | redmine-13bf8dc8bfb43a9c4add53f8a170a42e66058233.tar.gz redmine-13bf8dc8bfb43a9c4add53f8a170a42e66058233.zip |
ruby1.8 compatibility.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12018 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/issues_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index b06e635e0..ef778865d 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -103,7 +103,8 @@ class IssuesController < ApplicationController @journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id ASC").all @journals.each_with_index {|j,i| j.indice = i+1} @journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project) - @journals.select! {|journal| journal.notes? || journal.visible_details.any?} + # TODO: use #select! when ruby1.8 support is dropped + @journals.reject! {|journal| !journal.notes? && journal.visible_details.empty?} @journals.reverse! if User.current.wants_comments_in_reverse_order? @changesets = @issue.changesets.visible.all |