I’ve been following Ryan’s recent railscast on creating dynamic select
menus using javascript:
He suggests the following method to create and load rails generated
javascript:
- create a ‘javascripts’ controller
- create a method within that controller
- create a file called method_name.js.erb in app/views/javascripts
- use an application helper method in the view to load the javascript
in the head.
I’ve gotten javascripts/method_name.js to render properly in my browser.
It appears to load into my view with this helper method:
The script doesn’t seem to load however. The html source doesn’t confirm
much since I can get it to reference non-existent javascripts without
error. Any idea what might be preventing the load or what I could check
to get a better idea of what’s going on?
Thanks,
Peter