Forum: Ruby on Rails Upgrade to Rails 1.2.2 : RESTful routes not working anymore

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fa649cbe578868ea93801ab4bbedcd5c?d=identicon&s=25 Thomas Balthazar (Guest)
on 2007-02-07 10:45
(Received via mailing list)

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

  map.with_options :path_prefix => "/admin", :name_prefix => "admin_" do
    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 =>

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:

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,
4a1379eb0f10e1dd0e1466bfbf0f8245?d=identicon&s=25 Thijs Cadier (Guest)
on 2007-02-07 11:18
(Received via mailing list)
I've seen the exact same error, looks like a regression in Rails
Fa649cbe578868ea93801ab4bbedcd5c?d=identicon&s=25 Thomas Balthazar (Guest)
on 2007-02-07 15:32
(Received via mailing list)
Rick Olson gave me the solution.
#destroy is a reserved word.
I changed to trash.
Works like a charm.
Happy again ;o)
15c80c9bf8be5ba6e5eeac9cb0304464?d=identicon&s=25 Ed Hickey (Guest)
on 2007-02-07 16:53
(Received via mailing list)
ah hah!  makes sense.

This topic is locked and can not be replied to.