# Form.select question

**URL:** <https://www.ruby-forum.com/t/form-select-question/118642>\
**Category:** Ruby\
**Created:** [October 29, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/form-select-question/118642 "2007-10-29T18:27:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Hackenyos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@Dave\_Hackenyos](https://www.ruby-forum.com/u/Dave_Hackenyos)\
**Post date:** [October 29, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/form-select-question/118642/1 "2007-10-29T18:27:13Z")

</div>

Hello,

```
I am researching Ruby and Rails and am having a little trouble. I 

```

have a form that look like this:

\<% form\_for :book, :url =\> { :action =\> :sort } do |form| %\>  
\<%= form.select :sort\_type,  
Book::SORT\_TYPES,  
:prompt =\> “sort reviews by”  
%\>  
\<%= submit\_tag “Sort”, :class =\> “submit” %\>  
\<% end %\>

```
--SORT_TYPES is a hash in the Book model class which presents a 

```

couple of choices to the user.  
–when the form is submitted to the sort method, how is the value of  
the drop down trapped in the controller’s sort method? Nothing I  
implement seems to do anything.

Any help would be appreciated.

Thanks,  
Dave Hackenyos

Videx Inc. 1105 N. E. Circle Blvd. Corvallis OR 97330 (541) 758-0521  
CONFIDENTIAL COMMUNICATION: The email message and any attachments are  
intended only for the addressee. They may be privileged, confidential,  
and protected from disclosure. If you are not the intended recipient,  
any dissemination, distribution, or copying is expressly prohibited. If  
you received this email message in error, please notify the sender  
immediately by replying to this e-mail message or by telephone

---

<div class="post-metadata">

**Author:** ![Dave\_Hackenyos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@Dave\_Hackenyos](https://www.ruby-forum.com/u/Dave_Hackenyos)\
**Post date:** [October 29, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/form-select-question/118642/2 "2007-10-29T19:43:18Z")

</div>

Dave Hackenyos wrote:

> Hello,
> 
> ```
> I am researching Ruby and Rails and am having a little trouble. 
> 
> ```

You’ll probably get more response over at the Rails list…

[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en)
