Hey,
I had a similar problem, so maybe this will help you:
I wanted to send value of a <input> tag via AJAX request. I''m
doing
this using link_to_remote procedure and :with option. In this :with
option I can specify some Javascript code to retrieve tags value. So
maybe you could place there some JS that will send your array. All
these things are in ActionView''s Prototype Helper. Unfortunately, you
won''t find the :with option in official Rails API. Dig through Rails
source code and PrototypeJS documentation, and maybe you will figure
out how to send your array.
Regards,
Mike
On 5 Wrz, 23:10, sab <sab...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi all
>
> I''m trying to figure out the best way to send the contents of a
> javascript array containing floats to the controller and have the
> controller correctly interpret it as an array of floats.
>
> So if I have
> var points = [1,2,3,4,5,6]
>
> I need to send this to the controller so I can
>
> points_rb = param[:points]
> or something similar
>
> thanks
> sab
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---