I have a text_field and select tag in my user creation page form:
= f.text_field :username, :value => "Username"
= f.select :gender, { "Male" => "male", "Female" => "female"}, :prompt => "Gender"
When I leave the page and come back the username text_field doesn’t retain the value, but the select tag does retain the value. Why is this happening? I am not doing anything to save the select tag gender value. My assumption is since its HTTP then by default the values shouldn’t retained if I leave the page and come back unless I’m doing something to retain the values.
Your browser is probably causing this. What browser are you using? Use the “View Source” command in your browser to see if it is the Rails app or the browser.