Forum: Ruby on Rails Routing error?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ali (Guest)
on 2009-04-09 22:38
(Received via mailing list)
I hope this will be an easy question...

I'm trying to migrate from Rails 1.2 to 2.1, and I must admit, the
routing is somewhat confusing me.

When I update a form, I'm getting a routing error.  ("No route matches
{id}") It's because the update statement is getting assembled
incorrectly somehow and the action is getting set to the id instead of
"update"!  I don't understand how this is happening.  Does it have to
do with routing?

Here's my development.log showing what I'm talking about.

Parameters: {"commit"=>"Save",
"authenticity_token"=>"5d5f2530096051f30a11d94701281b54a537a012",
"action"=>"13",
"adminbillingrate"=>{"rate"=>"30", "employeetype_codeid"=>"119"},
"controller"=>"adminbillingrates"}

Any help would be appreciated as always!!
~Ali
Ali (Guest)
on 2009-04-10 03:18
(Received via mailing list)
I figured it out.  I was using form_tag :action => 'update' instead of
form_for and that was causing the update statement to be incorrectly
assembled.

Thanks anyway!!
This topic is locked and can not be replied to.