<%= link_to 'Destroy',:confirm => 'Are you sure?',:action =>
'destroycat',:id => p.id, :method => :delete %>
and controller like this
def destroycat
@pro_categorie = ProCategorie.find(params[:id])
@pro_categorie.destroy
respond_to do |format|
format.html { redirect_to(admins_url) }
format.xml { head :ok }
end
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---