I have a problem I have seen on several posts here but nowhere have I
found a solution. If I call the action edit in a link_to_remote call,
id and action are confused. If I instead call edit2 as action it works
fine. I find that strange!
The call:
<%= link_to_remote index_tablerow.full_name, :url => { :controller =>
''horses'', :action => ''edit'', :id =>
index_tablerow.id } %>
results in (authenticity_token removed):
Parameters: {"action"=>"6",
"id"=>"edit",
"controller"=>"horses",
"_"=>""}
ActionController::UnknownAction (No action responded to 6. Actions:
create, destroy, edit, edit2, index, new, show, and update):
But the call:
<%= link_to_remote index_tablerow.full_name, :url => { :controller =>
''horses'', :action => ''edit2'', :id =>
index_tablerow.id } %>
results in:
Processing HorsesController#edit2 (for 127.0.0.1 at 2010-01-10
12:13:30) [POST]
Parameters: {"action"=>"edit2",
"id"=>"6", "controller"=>"horses",
"_"=>""}
My routs:
map.connect '':controller/:action/:id''
map.connect '':controller/:action/:id.:format''
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.