Class: Myengine::CommentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Myengine::CommentsController
- Defined in:
- app/controllers/myengine/comments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/myengine/comments_controller.rb', line 5 def create @post = Post.find(params[:post_id]) @comment = @post.comments.create(params[:comment]) flash[:notice] = "Comment has been created!" redirect_to posts_path end |