Ok basically I have a search form to search for profiles given certain
parameters. Here''s what I have for part of it
<div id="address_item" class="left">
<%= f.label :gender %><br />
<%= f.select :gender, Profile::GENDERS, :prompt =>
''All'' %>
</div>
<div id="address_item" class="left">
<%= f.label :age %><br />
<%= f.select :age, Profile::AGES, :prompt => ''All''
%>
</div>
Now the gender field defaults to ''All'' when you load the page
just like
the :prompt says, but for some reason the age field doesn''t contain
''All'' and defaults to the first value in the array. I
can''t figure out
why it''s doing this. Both fields are exactly the same, but the age
field
doesn''t have ''All'' as an option from the :prompt. I
have a degree field
that is also the same and works properly. The problem seems to occur
within the f.select :age. If i change it to f.select :something_else it
works fine. Is there some kind of problem with naming a field age maybe?
Thanks for any help because I''m stumped on this one.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---