Skip to content

Instantly share code, notes, and snippets.

@charliemaffitt
Created March 16, 2010 17:40
Show Gist options
  • Save charliemaffitt/334279 to your computer and use it in GitHub Desktop.
Save charliemaffitt/334279 to your computer and use it in GitHub Desktop.
<!-- index.html.erb -->
<% form_tag search_path do %>
<%= select :search, :state, State.all.collect { |m| [m.full_name, m.id] }.sort, {:prompt=>'Please Select...'} %>
<%= observe_field(:state, :url => { :action => :update_city_menu },
:update => :city_field_div,
:with => :state
) %>
<div id="city_field_div"></div>
<%= submit_tag 'Submit' %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment