# Javascript float array in params hash

**URL:** <https://www.ruby-forum.com/t/javascript-float-array-in-params-hash/113892>\
**Category:** Rails\
**Created:** [September 5, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/javascript-float-array-in-params-hash/113892 "2007-09-05T23:11:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@sab](https://www.ruby-forum.com/u/sab)\
**Post date:** [September 5, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/javascript-float-array-in-params-hash/113892/1 "2007-09-05T23:11:16Z")

</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:** ![sab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@sab](https://www.ruby-forum.com/u/sab)\
**Post date:** [September 6, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/javascript-float-array-in-params-hash/113892/2 "2007-09-06T21:15:04Z")

</div>

Hey,

I had a similar problem, so maybe this will help you:

I wanted to send value of a 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
