# Select/drop-down menu

**URL:** <https://www.ruby-forum.com/t/select-drop-down-menu/69161>\
**Category:** Rails\
**Created:** [September 19, 2006, 2:34am UTC](https://www.ruby-forum.com/t/select-drop-down-menu/69161 "2006-09-19T02:34:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@richard](https://www.ruby-forum.com/u/richard)\
**Post date:** [September 19, 2006, 2:34am UTC](https://www.ruby-forum.com/t/select-drop-down-menu/69161/1 "2006-09-19T02:34:59Z")

</div>

I’m not sure how to create a select menu with multiple options that when  
you choose one calls the same action as all the others but provides  
different parameters. Any ideas?

---

<div class="post-metadata">

**Author:** ![richard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@richard](https://www.ruby-forum.com/u/richard)\
**Post date:** [September 19, 2006, 4:27am UTC](https://www.ruby-forum.com/t/select-drop-down-menu/69161/2 "2006-09-19T04:27:38Z")

</div>

On 9/19/06, Richard [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m not sure how to create a select menu with multiple options that when  
> you choose one calls the same action as all the others but provides  
> different parameters. Any ideas?

The value of the selected element will be passed as a form parameter:

\<%= form\_start\_tag :url=\>{:controller=\>‘some\_controller’,  
:action=\>‘some\_action’} %\>

 First Option Second Option \<%= form\_end\_tag %\>

and

class Somecontroller  
def some\_action  
value = params[:my\_select\_box]  
end  
end

Cheers,  
Max
