Method: CommentsController#update
- Defined in:
- app/controllers/comments_controller.rb
#update ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'app/controllers/comments_controller.rb', line 60 def update @post = Post.find(params[:post_id]) @comment = Comment.find(params[:id]) if @comment.update_attributes(params[:comment]) respond_to do |format| format.html do flash[:notice] = 'Save successful!' redirect_to post_path(@post, :anchor => dom_id(@comment)) end end else render :action => 'edit' end end |