# Creating multiple objects on the same page

**URL:** <https://www.ruby-forum.com/t/creating-multiple-objects-on-the-same-page/126510>\
**Category:** Rails\
**Created:** [January 18, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/creating-multiple-objects-on-the-same-page/126510 "2008-01-18T21:17:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 18, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/creating-multiple-objects-on-the-same-page/126510/1 "2008-01-18T21:17:39Z")

</div>

Hi,

I want to have a very simple ordering page where users type in what  
they want. They have a maximum of ten items to enter and must enter  
at least one. The item table has these columns:

id integer unsigned auto\_increment,  
order\_number integer unsigned  
item\_number integer unsigned,  
description text

My question is, what is the proper naming procedure on the ordering  
view page for each of the ten items so that the controller may most  
easily store the items? What is the corresponding code that I should  
put in the controller?

Thanks, - Dave

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 19, 2008, 1:36am UTC](https://www.ruby-forum.com/t/creating-multiple-objects-on-the-same-page/126510/2 "2008-01-19T01:36:45Z")

</div>

sounds like the naming convention you would want would be something like

object[attribute][]

ie.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 21, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/creating-multiple-objects-on-the-same-page/126510/3 "2008-01-21T19:18:48Z")

</div>

Thanks but what if I have 10 of that same item on the page. Would I  
then change my convention to:

and if so, how would I process that on the controller end?

- Dave

On Jan 18, 6:36 pm, Keynan P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
