The below code renders the *.js.erb file and updates the display div when hit on the Display button. but it doesn’t render the *.js.erb file onchange of the dropdown, it only renders the *.html.erb.
any idea?
<%= form_tag monitors_path, :id => 'monitor',:method => :get, :remote => true do %>
<%= collection_select(:monitor, :job_id, Job.all, :id, :name, options ={:prompt => "Select a Run"}, {:onchange => "$('monitor').submit()"} ) %>
<%= submit_tag 'Display' %>
<% end %>
<div id="display"></div>
Thanks,
Volkan
this worked but not sure if it’s the best solution for rail 3.