Here is my environment:
resources :homes do collection do get 'set_active' end end
def set_active @home = Home.find(params[:id]) respond_to do |format| format.js end end
<%= link_to home.status, set_active_homes_path(id: home.id), remote: true %>
If i take out the respond to in the set_active action, it complains of a missing template even though I have a set_active.js file in the views/homes. This leads me to believe the respond_to block is the issue and not the fact that I am sending the JS format from the URL. It looks like this action is only responding to html even though i have put remote: true in the link_to. I am trying to understand what I am missing.
I did google around and the only thing I saw was that the js mime-type was not available by default and to add it to the mime-types initializer. But when i did that, rails said that it was already initialized.
Am I missing something to be able to add JS/JQuery support?
Thanks in advance