From JavaScript, I call the controller via AJAX, for example:
$.ajax({ type: 'GET', url: '/books' }
In my controller, I:
def index render 'lightbox.js.erb' end
On my routes, I:
resources :books do member do get :lightbox end end
In lighbox.js.erb, I have:
alert("Hello world!");
For some reason, a warning will never be triggered. I do not receive error messages either through the server or through Firebug. I am at a loss what could go wrong. Any ideas?
ajax ruby-on-rails
nullnullnull
source share