summaryrefslogtreecommitdiffstats
path: root/app/controllers/news_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-14 20:53:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-14 20:53:14 +0000
commit46756cbd5646286a96df9058373324454add49a4 (patch)
tree971e3dbe40cbd7db875a416d7e524e7f45bbb71b /app/controllers/news_controller.rb
parent48205aa7d98275c8effbc21750449cb2461b0e57 (diff)
downloadredmine-46756cbd5646286a96df9058373324454add49a4.tar.gz
redmine-46756cbd5646286a96df9058373324454add49a4.zip
Fixed 500 error when displaying a news with comments in reverse order (#18332).
git-svn-id: http://svn.redmine.org/redmine/trunk@13595 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/news_controller.rb')
-rw-r--r--app/controllers/news_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb
index 50c0489f4..e1ef1c3ec 100644
--- a/app/controllers/news_controller.rb
+++ b/app/controllers/news_controller.rb
@@ -58,7 +58,7 @@ class NewsController < ApplicationController
end
def show
- @comments = @news.comments
+ @comments = @news.comments.to_a
@comments.reverse! if User.current.wants_comments_in_reverse_order?
end