somehow I broke my RESTful edit action and can''t figure out how. map.resources :posts when I open /posts/10/edit the action_name is ''edit 10'' rather than ''edit'' and if I hit reload or try to edit another post, I get No action responded to edit 10 Can someone give me a clue what could be happening here? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
can you test it :
map.edit ''posts/:action/:id'', :controller =>
''post'', :action => ''edit''
OR
map.edit ''posts/:action'',
:controller => ''post'', :action =>
''edit'',
:requirements => { :id => /\d+/},
:id => nil
>
> when I open
>
> /posts/10/edit
it is the same like :
map.edit ''posts/:id/:action'', :controller =>
''post'', :action => ''edit''
>
> the action_name is ''edit 10'' rather than
''edit''
>
Are you sure that the :action => "edit 10" not :action =>
"edit_10" ?
> No action responded to edit 10
>
Is 10 id?
Regard,
Reinhart
http://teapoci.blogspot.com
--
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
-~----------~----~----~----~------~----~------~--~---
yikes, it tunrs out I had a piece of code in my helper where I did
this
str = controller.action_name << '' '' << ...
instead of
str = controller.action_name + '' '' + ...
or
str = "#{controller.action_name} ..."
D''OH! I knew it was something trivial and stupid.
On Apr 18, 10:35 pm, Visit Indonesia 2008 <rails-mailing-l...@andreas-
s.net> wrote:> can you test it :
> map.edit ''posts/:action/:id'', :controller =>
''post'', :action => ''edit''
>
> OR
>
> map.edit ''posts/:action'',
> :controller => ''post'', :action =>
''edit'',
> :requirements => { :id => /\d+/},
> :id => nil
>
>
>
> > when I open
>
> > /posts/10/edit
>
> it is the same like :
> map.edit ''posts/:id/:action'', :controller =>
''post'', :action => ''edit''
>
>
>
> > the action_name is ''edit 10'' rather than
''edit''
>
> Are you sure that the :action => "edit 10" not :action =>
"edit_10" ?
>
> > No action responded to edit 10
>
> Is 10 id?
>
> Regard,
>
> Reinharthttp://teapoci.blogspot.com
>
> --
> Posted viahttp://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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---