# Multiple Check Box

**URL:** <https://www.ruby-forum.com/t/multiple-check-box/165764>\
**Category:** Rails\
**Created:** [April 17, 2009, 6:20am UTC](https://www.ruby-forum.com/t/multiple-check-box/165764 "2009-04-17T06:20:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![psnavaneethan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@psnavaneethan](https://www.ruby-forum.com/u/psnavaneethan)\
**Post date:** [April 17, 2009, 6:20am UTC](https://www.ruby-forum.com/t/multiple-check-box/165764/1 "2009-04-17T06:20:50Z")

</div>

I had given like

Java\<%=check\_box\_tag “employees”, “skills[]”, “Java” %\>  
Rails\<%=check\_box\_tag “employees”, “skills[]”, “Rails” %\>  
C\<%=check\_box\_tag “employees”, “skills[]”, “C” %\>

since it belongs to the “employee” object. So both the checkboxes (Java  
and Rails) are selected in the “new” page.

In the controller, I had given

@employees = Employees.new(@params[‘employees’])  
@employees.save

Also in the DB, I am having a table called as “employees” and in that  
“skills” is a column.

Is it possible in DB to have a single column “skills” for multiple  
checkboxes  
(Java, Rails and C)

Could you please suggest what needs to be done.

---

<div class="post-metadata">

**Author:** ![psnavaneethan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@psnavaneethan](https://www.ruby-forum.com/u/psnavaneethan)\
**Post date:** [April 17, 2009, 10:04am UTC](https://www.ruby-forum.com/t/multiple-check-box/165764/2 "2009-04-17T10:04:55Z")

</div>

On Apr 17, 5:20 am, Naveen N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> @employees = Employees.new(@params[‘employees’])  
> @employees.save
> 
> Also in the DB, I am having a table called as “employees” and in that  
> “skills” is a column.
> 
> Is it possible in DB to have a single column “skills” for multiple  
> checkboxes  
> (Java, Rails and C)

Well ActiveRecord will serialize stuff into a single column (see the  
serialize method), but typically the way you would do this would be to  
have a skills table and then a has many through between employees and  
skills.

Fred
