I have a view called hot.html.erb that lists items called "issues". I want a user to be able to simply change an option value and instantly submit the change using AJAX to update the database for things like "status".

What's happening is that when the option is selected, the database is updated, but I am redirected to the show.html.erb view. I would like to stay on the hot.html.erb view. I have a feeling I am not understanding the format.js entry and what needs to be done. Any help would be appreciated.

I am using jquery, query_ujs, rails.js.

I have implemented the following update.html.erb in my IssuesController:

This updates the attribute but doesn't redirect the page. I can verify that the value is changing by going to the show view for the record. I hope this helps somebody else wrestling with this issue too.