Project

General

Profile

Actions

Defect #23846

closed

NoMethodError (undefined method `reverse!'

Added by Jean-Michel Bain-Cornu over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi guys,

Found an error on activating a link on an announce :
NoMethodError (undefined method `reverse!' for #<ActiveRecord::Associations::CollectionProxy []>):
app/controllers/news_controller.rb:62:in `show'

There is a workaround by commenting the faulty line :

def show
@comments = @news.comments # @comments.reverse! if User.current.wants_comments_in_reverse_order?
end

but I miss skills to figure out what's happening.

Environment:
Redmine version 2.5.2.devel
Ruby version 2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
Rails version 4.1.8
Environment production
Database adapter Mysql2

Actions

Also available in: Atom PDF