select helper

I am trying to figure out how to use the "select" helper in changing a
scaffold produced "new.html.erb" file. Specifically how do I change:

<ul>Year In School:
    <%= f.text_field :year %>
</ul>

so that this shows up as a "drop down box".

I've tried different variations of

<%= f.select :year %>

but that never works.
Any help?

railsfid@gmail.com wrote:

I am trying to figure out how to use the "select" helper in changing a
<%= f.select :year %>

but that never works.
Any help?

try this

<%= f.select :year ,Time.now.year-100..Time.now.year %>

Nope, that doesn't work. To clarify, the year part is supposed to be a
pull down select menu of "Senior, Junior, Sophomore, Freshman"

railsfid@gmail.com wrote:

Nope, that doesn't work. To clarify, the year part is supposed to be a
pull down select menu of "Senior, Junior, Sophomore, Freshman"

On Oct 29, 10:11�pm, Thani Ararsu <rails-mailing-l...@andreas-s.net>

what is the error ? post it here.
what is your rails version?

and try this
<%= select :obj,:year ,%w{Senior Junior Sophomore Freshman} %>

Thani Ararsu wrote:

That did it, thanks