diff app/controllers/comments_controller.rb @ 929:5f33065ddc4b redmine-1.3

Update to Redmine SVN rev 9414 on 1.3-stable branch
author Chris Cannam
date Wed, 27 Jun 2012 14:54:18 +0100
parents cbb26bc654de
children 433d4f72a19b
line wrap: on
line diff
--- a/app/controllers/comments_controller.rb	Fri Feb 24 19:09:32 2012 +0000
+++ b/app/controllers/comments_controller.rb	Wed Jun 27 14:54:18 2012 +0100
@@ -7,7 +7,8 @@
 
   verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed }
   def create
-    @comment = Comment.new(params[:comment])
+    @comment = Comment.new
+    @comment.safe_attributes = params[:comment]
     @comment.author = User.current
     if @news.comments << @comment
       flash[:notice] = l(:label_comment_added)