# Adding a List to a rhtml file

**URL:** <https://www.ruby-forum.com/t/adding-a-list-to-a-rhtml-file/121567>\
**Category:** Rails\
**Created:** [November 28, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/adding-a-list-to-a-rhtml-file/121567 "2007-11-28T23:25:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gemblon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ee59a6/32.png) [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Post date:** [November 28, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/adding-a-list-to-a-rhtml-file/121567/1 "2007-11-28T23:25:06Z")

</div>

I am a bit confused on the easiest way to add a drop down list on a  
page,  
that is all data from another table? It seems there  
would be a gem or package made to do this. It has to be  
pretty common stuff.

If a user picks an item from the list, I just want the id,  
to store in a field in the active table.

how are you handling this? i was looking at acts\_as\_list.

any suggestions?

i have to do this a lot, so i was wondering. like, are you making  
static lists for web page.

thanks

---

<div class="post-metadata">

**Author:** ![gemblon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ee59a6/32.png) [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Post date:** [November 28, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/adding-a-list-to-a-rhtml-file/121567/2 "2007-11-28T23:36:36Z")

</div>

On Nov 28, 2007 4:25 PM, Trent B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I am a bit confused on the easiest way to add a drop down list on a  
> page,  
> that is all data from another table?

[http://api.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000512](http://api.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000512)

[http://api.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000517](http://api.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000517)

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![gemblon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ee59a6/32.png) [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Post date:** [November 29, 2007, 12:00am UTC](https://www.ruby-forum.com/t/adding-a-list-to-a-rhtml-file/121567/3 "2007-11-29T00:00:50Z")

</div>

Greg D. wrote:

> On Nov 28, 2007 4:25 PM, Trent B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > I am a bit confused on the easiest way to add a drop down list on a  
> > page,  
> > that is all data from another table?
> 
> [Peak Obsession](http://api.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000512)
> 
> [Peak Obsession](http://api.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000517)
> 
> –  
> Greg D.  
> [http://destiney.com/](http://destiney.com/)

thanks a bunch…

---

<div class="post-metadata">

**Author:** ![gemblon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ee59a6/32.png) [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Post date:** [December 7, 2007, 6:40pm UTC](https://www.ruby-forum.com/t/adding-a-list-to-a-rhtml-file/121567/4 "2007-12-07T18:40:06Z")

</div>

Thank you. I’ve been wondering about this.

John

On Nov 28, 5:00 pm, Trent B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
