Javascript not executing (I included format.js)
- by Brandon
I added format.js to my controller, yet I still cannot get the js in index.js.erb to execute when I view my index page. The only thing I can figure out is that it must be because of the model name. I had to add
ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular 'business', 'businesses'
end
to my inflections.rb file...because my model is called Business.
my views/js are located at views/businesses/*
Please help before I pull my hair out!
All I have in the index.js.erb file is:
alert(1);
Obviously the goal is that I will get an alert when I finally get the issue fixed, letting me know it is working.