# Problem with naming a field age?

**URL:** <https://www.ruby-forum.com/t/problem-with-naming-a-field-age/150253>\
**Category:** Rails\
**Created:** [October 6, 2008, 5:16pm UTC](https://www.ruby-forum.com/t/problem-with-naming-a-field-age/150253 "2008-10-06T17:16:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [October 6, 2008, 5:16pm UTC](https://www.ruby-forum.com/t/problem-with-naming-a-field-age/150253/1 "2008-10-06T17:16:36Z")

</div>

Ok basically I have a search form to search for profiles given certain  
parameters. Here’s what I have for part of it

 \<%= f.label :gender %\>  
 \<%= f.select :gender, Profile::GENDERS, :prompt =\> 'All' %\> 

 \<%= f.label :age %\>  
 \<%= f.select :age, Profile::AGES, :prompt =\> 'All' %\> 

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.

---

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [October 6, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/problem-with-naming-a-field-age/150253/2 "2008-10-06T17:59:27Z")

</div>

Actually disregard that, I figured out why it was doing that. Had  
nothing to do with the age field.
