| Article: |
Rolling with Ruby on Rails | |
| Subject: | Couldn't find Recipe without an ID | |
| Date: | 2005-07-08 06:01:09 | |
| From: | Peter_Kehl_TBWA | |
|
When using Rails 0.13.0 (with ruby 1.8.2 (2004-12-25) ), after reference from Recipe to Category is added, submission of http://127.0.0.1:3000/recipe/edit/1 form doesn't work. It submits to http://127.0.0.1:3000/recipe/update, which shows an following error:
|
||
Showing messages 1 through 4 of 4.
-
Couldn't find Recipe without an ID
2005-08-16 01:07:29 SixSide [View]
-
Couldn't find Recipe without an ID
2005-09-11 13:21:05 dankohn [View]
SixSide, only your version worked for me with rails 0.13.1 with ruby 1.8.2 (the versions on the website).
Curt, thank you for a fantastic article. But could you please update edit.rhtml as SixSide shows both in the article and in the sample ZIP file, as I believe nearly every reader is wasting time tracking down this bug.
Thanks. -
Couldn't find Recipe without an ID
2005-09-11 13:31:34 Curt Hibbs |
[View]
Sure... I'll confirm the change and ask my editor to update the article. -
Couldn't find Recipe without an ID
2005-09-13 06:12:04 Freewheelin [View]
Seconded - frankly I'm amazed this fundamental error has persisted for almost 9 months without official correction.



<form action="../update/" method="POST">
becomes
<form action="../update/<%= @recipe.id %>" method="POST">
Would anyone like to offer an 'official' response as to which of these 2 methods is the prefered Rails way?