Method: Book::BooksController#destroy

Defined in:
app/controllers/book/books_controller.rb

#destroyObject

DELETE /books/1 DELETE /books/1.json



77
78
79
80
81
82
83
84
85
# File 'app/controllers/book/books_controller.rb', line 77

def destroy
  @book = Book.find(params[:id])
  @book.destroy
  
  respond_to do |format|
    format.html { redirect_to books_url }
    format.json { head :no_content }
  end
end