Im new to ROR but i started prior to ROR 2.02. I spent a lot of time
with the Depot app from "Agile web development 2nd" then upgraded to
2.02 and have learned alot getting the Depot app to work.
the app works well exept for in the following condition:
-------should envoke the update action in the admin_controller
def update
@product = Product.find(params[:id])
if @product.update_attributes(params[:product])
flash[:notice] = 'Product was successfully updated.'
redirect_to :action => 'show', :id => @product
else
render :action => 'edit'
end
end
------UnknownAction (No action responded to 1):
it looks like the :id is getting set in place of the action. Here is
the log
Processing AdminController#1 (for 127.0.0.1 at 2008-01-31 23:35:31)
[POST]
Session ID:
BAh7CDoMdXNlcl9pZGkGOgljYXJ0bzoJQ2FydAY6C0BpdGVtc1sAIgpmbGFz
%0AaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpA
%0AdXNlZHsA--a63cf499f342a8eddf7aff208c4e2824f8df4886
Parameters: {"commit"=>"Update", "product"=>{"image_url"=>"/images/
auto.jpg", "title"=>"Pragmatic Project Automation", "price"=>"29.9",
"description"=>"Pragmatic Project Automation</em> shows you how to
improve the consistency and repeatability of your project's procedures
using automation to reduce risk and errors.\r\n\r\nSimply put, we're
going to put this thing called a computer to work for you doing the
mundane (but important) project stuff. That means you'll have more
time and energy to do the really exciting---and difficult---stuff,
like writing quality code."}, "action"=>"1", "controller"=>"admin"}
e[4;35;1mUser Load (0.000275)e[0m e[0mSELECT * FROM users WHERE
(users."id" = 1) LIMIT 1e[0m
ActionController::UnknownAction (No action responded to 1):