title: Passing array via hidden fields to rails
body: <p>i have a hidden_tag like this in my form</p>
  
  <pre><code> &lt;%= f.hidden_field :loc , {:multiple =&gt; true}  %&gt;
  </code></pre>
  
  <p>which renders to </p>
  
  <pre><code> &lt;input id="business_loc" multiple="multiple" name="business[loc][]" type="hidden" style="color: rgb(175, 175, 175); " value=""&gt;
  </code></pre>
  
  <p>currently am setting the business_loc value as a comma seperated string hoping rails would recognize when submit the form. But this is the value i got on the server side</p>
  
  <pre><code>      "loc"=&gt;["80.22167450000006,13.0454044"] 
  </code></pre>
  
  <p>instead</p>
  
  <pre><code>      "loc"=&gt;[80.22167450000006,13.0454044] 
  </code></pre>
  
  <p>how do i set the correct value in hidden field, so rails can understand it correctly.</p>