Mercurial > hg > soundsoftware-site
comparison app/controllers/comments_controller.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | 40f7cfd4df19 |
children | 5f33065ddc4b |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
10 @comment = Comment.new(params[:comment]) | 10 @comment = Comment.new(params[:comment]) |
11 @comment.author = User.current | 11 @comment.author = User.current |
12 if @news.comments << @comment | 12 if @news.comments << @comment |
13 flash[:notice] = l(:label_comment_added) | 13 flash[:notice] = l(:label_comment_added) |
14 end | 14 end |
15 | 15 |
16 redirect_to :controller => 'news', :action => 'show', :id => @news | 16 redirect_to :controller => 'news', :action => 'show', :id => @news |
17 end | 17 end |
18 | 18 |
19 verify :method => :delete, :only => :destroy, :render => {:nothing => true, :status => :method_not_allowed } | 19 verify :method => :delete, :only => :destroy, :render => {:nothing => true, :status => :method_not_allowed } |
20 def destroy | 20 def destroy |
30 super | 30 super |
31 @news = @object | 31 @news = @object |
32 @comment = nil | 32 @comment = nil |
33 @news | 33 @news |
34 end | 34 end |
35 | 35 |
36 end | 36 end |