How to call javascript file in Ruby On Rails
问题 I have two Layouts and each layout have different CSS and Js files. while i use <%= javascript_include_tag 'application' %> then, it brings all .js files. Is anything available like following way: <%= javascript_include_tag 'folder/script1.js' %> <%= javascript_include_tag 'folder/script2.js' %> <%= javascript_include_tag 'folder/script3.js' %> ... Is there a way to only include all scripts in an specific folder? Thanks. 回答1: Create a new file application_foo.js with the following content; //