1: 2:
<%= select("any", "country", @country.collect {|c| [ c.name, c.id ] }, {:include_blank => false}) %> <%= select("entry", "state_id", @state.collect {|s| [ s.name, s.id ] }, {:include_blank => false}) %>
1: 2: 3: 4: 5:
<%= options_from_collection_for_select(Country.find(:all), :id, :name, @state.country_id ) %> # the country with an id matching the state's country_id will be selected by default