# javascript float array in params hash

**URL:** <https://discuss.rubyonrails.org/t/javascript-float-array-in-params-hash/17818>\
**Category:** rubyonrails-talk\
**Created:** [September 5, 2007, 9:10pm UTC](https://discuss.rubyonrails.org/t/javascript-float-array-in-params-hash/17818 "2007-09-05T21:10:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sab](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sab](https://discuss.rubyonrails.org/u/sab)\
**Post date:** [September 5, 2007, 9:10pm UTC](https://discuss.rubyonrails.org/t/javascript-float-array-in-params-hash/17818/1 "2007-09-05T21:10:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jasiu85](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jasiu85](https://discuss.rubyonrails.org/u/jasiu85)\
**Post date:** [September 6, 2007, 7:14pm UTC](https://discuss.rubyonrails.org/t/javascript-float-array-in-params-hash/17818/2 "2007-09-06T19:14:17Z")

</div>

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
