title: Push values into hidden field array using Jquery in rails 3
body: <p>I want that when user click on any row of table base div.I insert id of that row into hidden </p>
  
  <p>field array. Hence user can select multiple rows.And i want insert id into hidden field array </p>
  
  <p>when click event will be invoke..</p>
  
  <p>My html code is</p>
  
  <pre><code>     &lt;div id="originator_rates"&gt;
         &lt;% unless @orig_codes.blank? %&gt;
           &lt;% @orig_codes.each do |code| %&gt;
           &lt;div id="&lt;%= code.id %&gt;_"  onclick="rate_entry_select_originator('&lt;%=code.id%&gt;')" class="rate_select"&gt;
              &lt;%= hidden_field_tag 'code_id[]', :id =&gt; 'code_id' %&gt;              
           &lt;/div&gt;  
        &lt;%end%&gt; 
        &lt;div&gt;
  </code></pre>
  
  <p>my js code is</p>
  
  <pre><code>       function rate_entry_select_originator(code_id) {
            $('#code_id').push(code_id);  //how i push values into array
  
  
         }
  </code></pre>