Upgrade to Rails 1.2.2 : RESTful routes not working anymore

Hello,

I just upgraded my app to Rails 1.2.2.
My routes are :

map.with_options :path_prefix => “/admin”, :name_prefix => “admin_” do
|m|
m.resources :requests, :controller => “admin/requests”, :collection
=> {
:destroy => :delete, :search => :post } do |request|
request.resources :histories, :path_prefix =>
“/admin/requests/:request_id”, :name_prefix => “admin_”, :controller =>
“admin/histories”
end
end

I got this error :
admin_destroy_requests_url failed to generate from {:action=>“destroy”,
:controller=>“admin/requests”}, expected: {:action=>“destroy”,
:id=>/[^/;.,?]+/, :controller=>“admin/requests”}, diff:
{:id=>/[^/;.,?]+/}

From this piece of code
<% form_for(:request, :url => admin_destroy_requests_path, :html => {
:method => :delete, :id => :adminDeleteForm, :name => :adminDeleteForm
}) do
|f| %>

If I switch my app back to 1.2.1, everything works fine.
Any idea?

Thanks in advance,
Thomas.

I’ve seen the exact same error, looks like a regression in Rails

Rick O. gave me the solution.
#destroy is a reserved word.
I changed to trash.
Works like a charm.
Happy again ;o)
Thomas;

ah hah! makes sense.

ed