# Routing error?

**URL:** <https://www.ruby-forum.com/t/routing-error/165169>\
**Category:** Rails\
**Created:** [April 9, 2009, 8:38pm UTC](https://www.ruby-forum.com/t/routing-error/165169 "2009-04-09T20:38:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@ali](https://www.ruby-forum.com/u/ali)\
**Post date:** [April 9, 2009, 8:38pm UTC](https://www.ruby-forum.com/t/routing-error/165169/1 "2009-04-09T20:38:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@ali](https://www.ruby-forum.com/u/ali)\
**Post date:** [April 10, 2009, 1:18am UTC](https://www.ruby-forum.com/t/routing-error/165169/2 "2009-04-10T01:18:17Z")

</div>

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!!
