Class: RailsBloggerEngine::CommentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RailsBloggerEngine::CommentsController
- Defined in:
- app/controllers/rails_blogger_engine/comments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/rails_blogger_engine/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 |