This is an issue that I've come across with the new rails 1.2.5
release, but I'm not sure if the problem lies within Rails, prototype
or scriptaculous.  My testing seems to point more towards
scriptaculous, but I'm not sure and maybe somebody can explain this

Looking at the two method calls using an array parameter (field), the
url is the exact same for both below (the urls below are how rails
generates these now with recent patches)...

new Ajax.Autocompleter('test', 'test_auto_complete',


You can see there is no difference in the url format above.

Now when the Request method is called, rails receives the parameters
as follows (which is correct)...

Processing TestController#auto_complete_for_test (for at
2007-10-14 18:18:34) [POST]
  Parameters: {"action"=>"auto_complete_for_test", "field"=>["a", "b",
"c"], "controller"=>"test"}

And when the Autocompleter method is called, rails receives the
parameters as follows (which is wrong, see that the field param is

Processing TestController#auto_complete_for_test (for at
2007-10-14 18:21:22) [POST]
  Parameters: {"action"=>"auto_complete_for_test", "field"=>["a"],
"controller"=>"test", "amp;field"=>["b", "c"], "test"=>"test"}

To test, I put a js alert in Ajax.Request to display the url (which
the Autocompleter calls as well) and when using Ajax.Request the url
looks like this (& removed)...


but when called via Autocompleter, it looks like this (& not removed)...


Looking at Autocompleter code, I see no url translation or escaping,
just a simple assignment for use with Ajax.Rqeuest, so what's going on
here?  I can see why rails would receive the wrong data between the
two, but why does the same url produce different results.  I'm totally
confused on this one.  Again, this looks like a javascript issue from
either prototype or scriptaculous, but this issue didn't seem to
appear until the latest Rails was released.


You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to