Hi,
I would like to ask for some suggestions on my problem with Routes.
It''s
probably pretty simpel.
This link:
<%= link_to image_tag("...", :alt => "...", :title
=> "..."),
edit_brand_path(brand) %>
Results in this URL:
http://localhost:3000/brands/21/edit
And echos this:
"Unknown action - No action responded to 21"
When I type http://localhost:3000/brands/edit/21, everything is fine.
There must be some problem with my resource. I have this in routes.rb
map.resources :brands
The application also doesn''t seem to update and create brands, which
seems to come from the same problem. I pretty much copy and pasted the
model from other ones, so my guess is, that I forgot something basic.
I got:
models/brand.rb
views/brands/...
controllers/brands_controller.rb
Thanks very much!
Steffen
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Steffen Wenzel
2009-Feb-20 10:18 UTC
Re: RESTful Routes not working - Switches ID and Action
Okay, told this problem to my colleague (no Rails guy), just in an abstract form. And when I told him "Normally I just have to put map.resource in routes.db" it hit me: I didn''t restart the server. Problem solved. Sorry for spamming the list, maybe it helps the next newbie like me. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---