The pipeline "compiles" all your js file into 1 so it doesn't really matter since the file will be cached and hopefully minified (I don't think that the minification is currently working). I would however recommend to not use require_tree but to list the files individually to make sure they get loaded in the right order.
- Matt On Tue, Jul 19, 2011 at 4:41 PM, Rafael MVC <[email protected]> wrote: > It seems that the standard operation of the asset pipeline is to load all > javascripts from the /apps/assets/javascript into application.js. > > I figure out that is because of the sprocket '//= require_tree .', but is > that really a good option? > > The javascript from a specific page will be loaded in every single page? > So, is there a better way to make the specific javascript be loaded only > for that page? (without having to write content_for :head and > javascript_include_tag for every page) > This feels like a dangerous default to come already set to true. > > Thank you, > Rafael Cardoso > > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
