Class: BlogBoi::CommentsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- BlogBoi::CommentsController
- Defined in:
- app/controllers/blog_boi/comments_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 |
# File 'app/controllers/blog_boi/comments_controller.rb', line 7 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 |