Render a Drop Down

Hey all,

I was just wondering how I would render the following dropdown.

Contact Model

def full_name
self.Firstname + ’ ’ + self.Lastname
end

Inside the view I would like to produce a DropDown list that will have
the Firstname + Lastname displayed with the id as the value. I have
tried a few methods and cannot seem to find a way.

Cheers

There’s a couple of different options you have.
options_from_collection_for_select or select, itself. You might want to
go
over the API [
http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html]
to see which one suits your needs best but it looks like either of
them
will get you where you need.

RSL