#Controller
cookies[:state] = state
if state != nil and state.to_i != -1
conditions << 'stateid = ?'
cond_args << state
cookies[:state] = state
end
if !cookies[:state].blank?
@default_state = cookies[:state]
else
@default_state = ""
end
view - html
State:
<td><%= select_tag "stateid",
options_for_select(@state_names, :selected => @default_state) %>
SOURCE OF HTML
<td>State</td>
*** I WANT THE VALUE IN THE State value=“5.0” as the cookie.
<td><select id="stateid" name="stateid">
Any
OPEN
CLOSED
TEST