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'