title: Rails check_box_tag - get all the values checked in view(haml) file
body: <p>So I have multiple checkboxes on my page. I collect all of them like shown in the code below. I would like to access the values of the array before passing it on to the controller</p>
  
  <pre><code>= check_box_tag "names[]", ob.name, false, class: 'cbx'
  </code></pre>
  
  <p>I am able to pass them with my older code</p>
  
  <pre><code>%fieldset.actions
    = form.submit "Upgrade", :class =&gt; 'button'
  </code></pre>
  
  <p>Logs:</p>
  
  <blockquote>
    <p>Processing by SomeController#create as HTML   Parameters:
    {"utf8"=>"✓",
    "names"=>["ron", "jacob"],  "commit"=>"NameButton"}</p>
  </blockquote>
  
  <p>Ok. So i would like to access all values in my haml files. Is there a way before i submit my form, I can access which checkboxes are selected.</p>
  
  <p>I would like to pass the names[] to my controller as a parameter.</p>
  
  <pre><code>=link_to script_name1, { :action =&gt; 'create', :names =&gt; 'dontknowhowtopassnames[]' }, :method =&gt; :post
  </code></pre>
  
  <p>Rails version - 3.2.17</p>