How do I create a collection

Here's one way to create a collection:

words = %w{ this is a collection of some words }

Here's another (This one is an empty collection):

objects =

Now you can use the << method to add stuff to your collection:

object << my_object

But, seriously...

Take a look at:

options_for_select(container, selected = nil) Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container where the elements respond to first and last (such as a two-element array), the "lasts" serve as option values and the "firsts" as option text. Hashes are turned into this form automatically, so the keys become "firsts" and values become lasts. If selected is specified, the matching "last" or element will get the selected option-tag. Selected may also be an array of values to be selected when using a multiple select.

Examples (call, result):

As a side note you don't necessarily need collection_select for dealing with a static list.

Take a look a the rails documentation for: select(object, method, choices, options = {}, html_options = {})

which will in turn direct you to the previous post for the format of "choices."