This is the default application.js:
//= require jquery
//= require jquery_ujs
//= require_tree .
CoffeeScript templates have this content:
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
For me, "related to the matching controller here" means that foo_bar.js.coffee should ONLY be loaded when the foo_bar controller is used. Am I right?
Thing is that it loads all Javascript files even if they are not needed. Also... I would like to know how to conditionally include Javascript files depending on the controller's action.