Skip to content

Instantly share code, notes, and snippets.

@charliemaffitt
Created March 16, 2010 17:45
Show Gist options
  • Save charliemaffitt/334285 to your computer and use it in GitHub Desktop.
Save charliemaffitt/334285 to your computer and use it in GitHub Desktop.
<!-- update_city_menu.html.erb -->
<select id="neighborhood_field" name="search[city_field]">
<%- if @state.cities.present? -%>
<%= options_from_collection_for_select(@state.cities, :id, :name) %>
<%- else -%>
<option value=''>There are no cities in the state you selected.</option>
<%- end -%>
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment