Changing highlighColor default option AJAX - Ruby on Rails
I changed the high开发者_运维技巧lightColor and highlightEndColor in the /public/javascript/controls.js file but it isn't changing when the AJAX effect runs. What am I doing wrong?
Did those effects work in your view before you modified them? If not... to elaborate on EmFi's answer, you should have something like this:
<%= javascript_include_tag :defaults %>
or:
<%= javascript_include_tag 'controls.js' %>
These snippets should be somewhere in your application.html.erb usually at the top of the file (in the <head>
). The application.html.erb is usually found w/in your views/layouts directory.
Is this file being loaded?
It gets loaded if your view at any point provides :defaults, or "controls.js" to javascript_include_tag. This is usually done in the application layout.
精彩评论