Should we use the Rails built-in
bundling and caching instead of Bundle Fu?
The only disadvantage I can see is that Rails doesn't have JS
minification.
Rails API Examples ("Caching multiple stylesheets into
one"):
stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is false =>
<link href="/stylesheets/style1.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/styleB.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/styleX2.css" media="screen" rel="stylesheet" type="text/css" />
stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is true =>
<link href="/stylesheets/all.css" media="screen" rel="stylesheet" type="text/css" />
stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is false =>
<link href="/stylesheets/shop.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/cart.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/checkout.css" media="screen" rel="stylesheet" type="text/css" />
stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is true =>
<link href="/stylesheets/payment.css" media="screen" rel="stylesheet" type="text/css" />
Rails API Examples ("Caching multiple javascripts into
one")
stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is false =>
<link href="/stylesheets/style1.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/styleB.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/styleX2.css" media="screen" rel="stylesheet" type="text/css" />
stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is true =>
<link href="/stylesheets/all.css" media="screen" rel="stylesheet" type="text/css" />
stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is false =>
<link href="/stylesheets/shop.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/cart.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/checkout.css" media="screen" rel="stylesheet" type="text/css" />
stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when ActionController::Base.perform_caching is true =>
<link href="/stylesheets/payment.css" media="screen" rel="stylesheet" type="text/css" />