Class: Blogger::CommentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/blogger/comments_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject


5
6
7
8
9
10
# File 'app/controllers/blogger/comments_controller.rb', line 5

def create
@article = Article.find(params[:article_id])
@comment = @article.comments.create(comment_params)
flash[:notice] = "Comment has been created!"
redirect_to articles_path
end