class DistrictsController < ApplicationController
.
.
.
def destroy
@district = District.find(params[:id])
@district.destroy
respond_to do |format|
format.html { redirect_to(districts_url) }
format.xml { head :ok }
end
end
<% @districts.each do |district| %>
<td><%= link_to 'Show', district %></td>
<td><%= link_to 'Edit', edit_district_path(district) %></td>
<td><%= link_to 'Destroy', district, :confirm => 'Are you sure?',
:method => :delete %>
Cliccando sul link destroy mi viene mostrata la show.