Class: CommentsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- CommentsController
- Defined in:
- app/controllers/comments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
16 17 18 19 |
# File 'app/controllers/comments_controller.rb', line 16 def create @comment.save respond_with(@comment, ) end |
#destroy ⇒ Object
30 31 32 33 |
# File 'app/controllers/comments_controller.rb', line 30 def destroy @comment.destroy respond_with(@comment, ) end |
#edit ⇒ Object
21 22 23 |
# File 'app/controllers/comments_controller.rb', line 21 def edit respond_with(@comment) end |
#new ⇒ Object
12 13 14 |
# File 'app/controllers/comments_controller.rb', line 12 def new respond_with(@comment) end |
#update ⇒ Object
25 26 27 28 |
# File 'app/controllers/comments_controller.rb', line 25 def update @comment.update_attributes(params[:comment]) respond_with(@comment, ) end |