Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v3.0.9) is shown here.
destroy()
public
DELETE <%= route_url %>/1 DELETE <%= route_url %>/1.xml
# File railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb, line 74
def destroy
@<% singular_table_name %> = <% orm_class.find(class_name, "params[:id]") %>
@<%= orm_instance.destroy %<
respond_to do |format|
format.html { redirect_to(<%= index_helper %>_url) }
format.xml { head :ok }
end
end
end