On May 8, 10:06 am, stone <ftaft2...-uAjRD0nVeow@public.gmane.org>
wrote:>
> but when I try to add a new action name "ship" into the
controller and
> a new page names "ship.rhtml" corresponding to it
> things goes wrong, it looks like this:
>
.........................................................................................................................
> ActiveRecord::RecordNotFound in ProductsController #show
>
> Couldn''t find Product with ID=ship
>
````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
> the probelm is , it''s not an ID I input , i want it to be an
action
> request!!
Hi,
It''s a problem with your routes and the fact that you are using a non-
RESTful action name. If you want to remain true to RESTful
conventions, you should probably create a shipping controller. If you
want to keep the action in your current controller, you will need to
add a specific route to your routes.rb file.
Regards
Robin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---