# Submit button for drop down list

**URL:** <https://www.ruby-forum.com/t/submit-button-for-drop-down-list/123392>\
**Category:** Rails\
**Created:** [December 17, 2007, 10:40am UTC](https://www.ruby-forum.com/t/submit-button-for-drop-down-list/123392 "2007-12-17T10:40:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [December 17, 2007, 10:40am UTC](https://www.ruby-forum.com/t/submit-button-for-drop-down-list/123392/1 "2007-12-17T10:40:03Z")

</div>

I want to be able to add/remove Category items from the GUI rather than  
the console.

From “Listing feeds” clicking on “show” gives:

Feed: feed1  
Edit | Back  
Itemized Categories  
cat1  
category2

Then, clicking on “edit” will give:

Editing feed

Feed

Category  
Show | Back

Where there’s a drop down list of Category items. However, how do I  
add/  
remove the associated Category rows? I’m missing some sort of submit  
button?

thufir@arrakis ~/Desktop/strawr $  
thufir@arrakis ~/Desktop/strawr $ tail app/views/feeds/show.rhtml –  
lines=13

\<% if @feed.has\_categories? %\>

### Itemized Categories
 \<% for category in @feed.categories %\> \<% end %\> 

| \<%= category.category %\> |

\<% end %\>

thufir@arrakis ~/Desktop/strawr $  
thufir@arrakis ~/Desktop/strawr $ tail app/views/feeds/\_form.rhtml –  
lines=2

Category  
\<%= select("post", "category\_id", Category.find\_all.collect {|c| [c.category, c.id]}) %\>

thufir@arrakis ~/Desktop/strawr $

thanks,

Thufir
