I’ve got a partial that I’m trying to refresh, but I don’t get back any
results, nor do I see any errors in Firebug. I’m guessing there’s a
problem with the DOM, but I’m not sure. Can someone else take a look
and let me know where I’m missing something?
Controller:
def get_city_list
@show_javascript = true
@counties = StateList.find_by_state_code(params[:state_code])
render :update do |page|
page.replace_html ‘city_select’, :partial => ‘city_list’
end
View:
<%= collection_select (:state_code, :state_code,StateList.find(:all,
:order => “state ASC”, :select => ‘distinct state, state_code’),
:state_code, :state, {:prompt => ‘Select a state’}, {:id => :state_code
}) %>
<%= observe_field :state_code, :url => {:action => ‘get_city_list’},
:with => ‘state_code’ %>
THANKS!