# Send a list to the controller

**URL:** <https://www.ruby-forum.com/t/send-a-list-to-the-controller/139599>\
**Category:** Rails\
**Created:** [June 5, 2008, 11:01am UTC](https://www.ruby-forum.com/t/send-a-list-to-the-controller/139599 "2008-06-05T11:01:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mucca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cdc98d/32.png) [@mucca](https://www.ruby-forum.com/u/mucca)\
**Post date:** [June 5, 2008, 11:01am UTC](https://www.ruby-forum.com/t/send-a-list-to-the-controller/139599/1 "2008-06-05T11:01:42Z")

</div>

Hi all,  
I’m new on rails, I need to send a list from the template to the  
controller but if i define a list of checkbox wiith the some name the  
result is only 1 in the param into the controller … how can i do?

many thanks  
MuCcA

---

<div class="post-metadata">

**Author:** ![mucca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cdc98d/32.png) [@mucca](https://www.ruby-forum.com/u/mucca)\
**Post date:** [June 5, 2008, 11:05am UTC](https://www.ruby-forum.com/t/send-a-list-to-the-controller/139599/2 "2008-06-05T11:05:51Z")

</div>

On Jun 5, 8:44 am, mucca [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all,  
> I’m new on rails, I need to send a list from the template to the  
> controller but if i define a list of checkbox wiith the some name the  
> result is only 1 in the param into the controller … how can i do?

The key with array parameters is that the name of the input should end  
with []. If you created a list of checkboxes all with name[], and with  
values 1,2,3,… then your rails app should get an array parameter  
called name

Fred

---

<div class="post-metadata">

**Author:** ![mucca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cdc98d/32.png) [@mucca](https://www.ruby-forum.com/u/mucca)\
**Post date:** [June 5, 2008, 11:15am UTC](https://www.ruby-forum.com/t/send-a-list-to-the-controller/139599/3 "2008-06-05T11:15:19Z")

</div>

Ok i’l try…  
many thanks

Frederick C. ha scritto:
