Method: Discussion::CommentsController#update

Defined in:
app/controllers/discussion/comments_controller.rb

#updateObject



38
39
40
41
42
43
44
45
46
47
48
# File 'app/controllers/discussion/comments_controller.rb', line 38

def update
  respond_to do |format|
    if @comment.update_attributes(params[:comment])
      format.html { redirect_to @comment, notice: 'comment was successfully updated.' }
      format.json { head :no_content }
    else
      format.html { render action: "edit" }
      format.json { render json: @comment.errors, status: :unprocessable_entity }
    end
  end
end