Refactor: move NewsController#add_comment to CommentsController#create

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4170 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis committed 2010-09-22 16:25:09 +00:00
1 parent 3b20774c54
commit 1f2f953687
8 files changed
+83 -36

No files matched your search

-12
View File
@@ -73,18 +73,6 @@ class NewsController < ApplicationController
end
end
def add_comment
@comment = Comment.new(params[:comment])
@comment.author = User.current
if @news.comments << @comment
flash[:notice] = l(:label_comment_added)
redirect_to :action => 'show', :id => @news
else
show
render :action => 'show'
end
end
def destroy_comment
@news.comments.find(params[:comment_id]).destroy
redirect_to :action => 'show', :id => @news