I am working on a ruby on rails application. All the controllers have one javascript file. However there is a functionality ( call it business.js) which is needed by two controllers. Now just because two controllers need it , I don't want to put this logic in application.js which will make this logic available to all the controllers.
I want pages to have only the javascript files they must need and nothing extra.
I was wondering if sprockets is flexible enough to meet my requirement. From the documentation of sprocket I could not get any definite answer.