But how do you load the specific files?
Lets say you have a posts_controller and a posts.js, do you do
javascript_include_tag for it? It would be nice to load it automatically...
And WTH would it load everything as default? Such a bad idea! :)


On Tue, Jul 19, 2011 at 4:49 PM, Matt Aimonetti <[email protected]>wrote:

> 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

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to