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, :question_id=> @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? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Brian Hogan wrote:> instead of rendering ?candidate_id=1&question_id=1552 > we get ?candidate_id=1&question_id=1552I believe that is how it is supposed to work. Valid XHTML syntac says that attributes of elements must be HTML escaped. When the browser makes the request, it should properly decode it to what its supposed to be. I know you can pass jaascript variables with the request, but I am not familar with the sytac of that. Look up the :with option on the ajax helpers. -- 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 -~----------~----~----~----~------~----~------~--~---
Yeah... it "should" decode it... but according to firebug, and my Rails application, it does not. Firebug''s output: amp;question_id1729candidate_id1 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? On 8/11/07, Alex Wayne <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Brian Hogan wrote: > > instead of rendering ?candidate_id=1&question_id=1552 > > we get ?candidate_id=1&question_id=1552 > > I believe that is how it is supposed to work. Valid XHTML syntac says > that attributes of elements must be HTML escaped. > > When the browser makes the request, it should properly decode it to what > its supposed to be. > > I know you can pass jaascript variables with the request, but I am not > familar with the sytac of that. Look up the :with option on the ajax > helpers. > > -- > 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 -~----------~----~----~----~------~----~------~--~---