Mercurial > hg > soundsoftware-site
comparison app/controllers/comments_controller.rb @ 931:ec1c49528f36 cannam_integration
Merge from branch "redmine-1.3"
author | Chris Cannam |
---|---|
date | Wed, 27 Jun 2012 15:04:58 +0100 |
parents | 5f33065ddc4b |
children | 433d4f72a19b |
comparison
equal
deleted
inserted
replaced
930:027cc0f5d4a2 | 931:ec1c49528f36 |
---|---|
5 before_filter :find_project_from_association | 5 before_filter :find_project_from_association |
6 before_filter :authorize | 6 before_filter :authorize |
7 | 7 |
8 verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed } | 8 verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed } |
9 def create | 9 def create |
10 @comment = Comment.new(params[:comment]) | 10 @comment = Comment.new |
11 @comment.safe_attributes = params[:comment] | |
11 @comment.author = User.current | 12 @comment.author = User.current |
12 if @news.comments << @comment | 13 if @news.comments << @comment |
13 flash[:notice] = l(:label_comment_added) | 14 flash[:notice] = l(:label_comment_added) |
14 end | 15 end |
15 | 16 |