I am developing job portal using rails 4. In my application employer can post a job. In job post form, I want to provide multiple check-box for category names , so that while posting a job an employer could select multiple categories. How can I do this and how to save it to my job model?
Here is my view
<!-- check-boxs -->
<div class="form-group">
<label>Job Categories</label>
<div class="row clearfix">
<%JobCategory.all.each do |category|%>
<div class="col-md-4">
<div class="checkbox flat-checkbox">
<label>
<input type="checkbox">
<span class="fa fa-check"></span>
<%=category.name%>
</label>
</div>
</div>
<% end %>
</div>
</div><!-- end checkboxs -->