I have a Javascript library to load an AJAX file that I need to include on only one page. Where is the best folder for this file? app/assets/javascripts ? vendor/assets/javascripts ? lib/assets/javascripts ? And then I need to enable it on only one page. Or should I just add it to application.js and include it on every page (do I even know that I only use it on one page?)
I was counting on performance. Would it be best to put the mini JS file somewhere and just include it with javascript_include_tag on the page I need, using yield(:head) and content_for(:head) ? Thanks.
javascript ruby-on-rails assets
b0xxed1n
source share