It seems to be a prototype.js issue. The POST request looks as
follows:
fields%5B%5D=BCURD01_OS_CPU_%252525system&fields%5B%5D=BCURD01_OS_CPU_
%252525user
So looks like it''s a bad idea to have %-signs inside the strings.
Putting '' '' around the strings didn''t help.
But there must be a way to escape them or something?
On 19 Nov., 17:05, TF <thomasfalkenb...-Mmb7MZpHnFY@public.gmane.org>
wrote:> I''m using a form_remote_tag with a collection:
>
> <%= select_tag "fields[]",
> options_from_collection_for_select(@fields, :keyname, :keyname),
> :multiple => true,
> :size => "10"%>
>
> which works fine so far. The content of @fields looks something like
> this:
> MC1_OS_CPU_%iowait
> MC1_OS_CPU_%idle
> MC1_OS_CPU_%user
> [...]
>
> When submitting the form with a single value selected from the select
> field, everything works fine.
params:"fields"=>["BCURD01_OS_CPU_
> %user"]
>
> But when selecting multiple values, the params look like this:
> fields"=>["MC1_OS_CPU_%2525idle",
"MC1_OS_CPU_%2525iowait",
> "MC1_OS_CPU_%2525user"]
>
> Notice the 2525s. This only occours with special chars like "%"
or "&"
> inside the values.
>
> Any ideas how to fix this?
>
> Thanks,
> Thomas
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---