Rails, AJAX, and extra URL parameters

I recently updated an app from 1.1.6 to 1.2.3

Some places in the code, there are items like this:

                <%= in_place_editor "overrule_#{@candidate.id

}_#{@question.id}", {:url =>{ :controller =>‘grade’, :action=>‘set_grade_overrule’,

                     :candidate_id => @[candidate.id](http://candidate.id),
                     :question_id=> @[question.id](http://question.id)},
                  }
                %>

instead of rendering ?candidate_id=1&question_id=1552 we get ?candidate_id=1&question_id=1552

Now, I can solve this problem by defining routes, but is this correct that the URL is getting escaped? That seems wrong to me.

Is there a better way to pass additional parameters to the server instead of in the url when doing an ajax call?

Yeah… it “should” decode it… but according to firebug, and my Rails application, it does not.

Firebug’s output:

amp;question_id 1729 candidate_id 1 Notice that it’s amp;question_id instead of question_id. So it’s the unescaping that’s broken?

I don’t like the ‘with’ option cos I always screw it up, but it would probably be better. Right now this is fixable with named routes… but man, why can’t it be easy?