title: Insert in DB array checkbox rails
body: <p>Need help for array insert in db using check box.</p>
  
  <pre><code>  &lt;% @companies.each do |company| %&gt;
    &lt;%= check_box_tag 'company_name[]', company.company_name %&gt; &lt;%= company.id %&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>how to insert this in create method</p>
  
  <pre><code>  def create
         @ebookAssignedCompanies = EbookCompanyAssigned.create(ebook_company_assigned_param)
         @ebookAssignedCompanies.save
    end
  
     private
  
    def ebook_company_assigned_param    
     params.permit(company_name:[]) 
    end
  </code></pre>
  
  <p>the result in mysql table is</p>
  
  <pre><code> +-------------+------------+
   | id |  company_name       |
   +-------------+------------+
   |  1 | ["MHT, "PMT"]       |
   +-------------+------------+
  </code></pre>
  
  <p>ny desired result</p>
  
  <pre><code>  +-------------+------------+
    | id |  company_name       |
    +-------------+------------+
    |  1 | MHT                 |
    |  2 | PMT                 |
    +-------------+------------+
  </code></pre>
  
  <p>please need help for this thank you</p>