DropDown Form from Database

Hey guys,

i'm new to rails and need some help. I want to create a simple
dropdown which gets its values from a model.

I found a propably suitable function but I dont quite get how to use
it. Here is what i did - and what does not work - but maybe you'll get
an idea for what it is meant for:

Server: <%= options_from_collection_for_select(@server, "pid",
"title", @account.server) %>

...
Well 'account' has a column which saves the server_id that correspons
to the id from servers table.

I hope you know what i mean... my english is a bit rusty :wink:

<%= select(:account, :server_id, Server.find(:all).collect{ |s| [s.name, s.id] }) %>

(http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#M000506)

This list is for discussing the development of the Rails framework, though. Please use the general Rails mailing list (http://groups.google.com/group/rubyonrails-talk) for help requests.

//jarkko

YAY! It works ... thanks a lot!