On 16 February 2011 10:49, Mauro
<mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> 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| %>
> <tr>
> <td><%= district.district_number %></td>
> <td><%= district.address %></td>
>
> <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 %></td>
> </tr>
> <% end %>
>
> If I click on destroy link it shows me the district.
>
Sorry I''ve missed javascript.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.