I am trying to auto populate the drop down list box based on the selection from the previous drop down. I saw an example in the web and it uses replace_html in the controller. The rest of my application is based on the jquery.Could you please let me know how to achieve it with jquery.
My Controller code:
def update_releases
puts "inside func"
project = Project.find(params[:project_id])
@releases = project.releases
render :update do |page|
page.replace 'releases'
page.replace_html 'cycles', :partial => 'cycles', :object => cycles
end
end
You can write inline jquery code, like this:
better is to use js.erb files (given that you’re using rails3):
and create a update_releases.js.erb template: