lib/generators/dry_crud/templates/app/controllers/crud_controller.rb
def destroy(&block)
    destroyed = run_callbacks(:destroy) { entry.destroy }
    flash[:alert] ||= error_messages.presence || flash_message(:failure) if !destroyed && request.format == :html
    location = !destroyed && request.env["HTTP_REFERER"].presence || index_url
    respond_with(entry, :success => destroyed, :location => location, &block)
  end
# Destroy an existing entry of this model.
# There are before and after destroy callbacks to hook into the action.
# To customize the response, you may overwrite this action and call
# super with a block that gets success and format parameters.
#   DELETE /entries/1
#   DELETE /entries/1.json
Destroy an existing entry of this model.
There are before and after destroy callbacks to hook into the action.
To customize the response, you may overwrite this action and call
super with a block that gets success and format parameters.
Destroy an existing entry of this model . There are before and after destroy callbacks to hook into the action . To customize the response you may overwrite this action and call super with a block that gets success and format parameters .
def destroy(&block)
    destroyed = run_callbacks(:destroy) { entry.destroy }
    flash[:alert] ||= error_messages.presence || flash_message(:failure) if !destroyed && request.format == :html
    location = !destroyed && request.env["HTTP_REFERER"].presence || index_url
    respond_with(entry, :success => destroyed, :location => location, &block)
  end
def destroy ( & block ) destroyed = run_callbacks ( :destroy ) { entry . destroy } flash [ :alert ] ||= error_messages . presence || flash_message ( :failure ) if ! destroyed && request . format == :html location = ! destroyed && request . env [ "HTTP_REFERER" ] . presence || index_url respond_with ( entry , :success => destroyed , :location => location , & block ) end
Destroy an existing entry of this model.
Destroy an existing entry of this model .
block