I''m having some issues with the us_states plugin but it is probably
because I don''t know what I''m doing.
Here''s my code:
<% form_tag ''/contact/list'' do -%>
<%= text_field_tag "searchName", "", :size => 15,
:maxlength => 50 -
%><%= submit_tag "Search" %>
<% if !params[:state].nil? %>
<%= us_state_select("state", "abbr", {:include_blank
=>
true, :selected => params[:state][:abbr]}) %>
<% else %>
<%= us_state_select("state", "abbr", {:include_blank
=> true}) %>
<% end %>
<% end -%>
<hr>
<%= debug params %>
I''ve tried various incarnations of the :selected option and am at a
loss. :include_blank works just fine, though.
Does anyone have any suggestions?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---