← Home

Javascript/CSS asset bundling a prominent feature in Rails 2.0

Actually this stuff even is in Rails Edge ever since February! So in Rails Edge we already can do this:


<%= javascript_include_tag :all, :cache => true %>
<%= stylesheet_link_tag :all, :cache => true %>

Or more flexibly:


<%= stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment"	%>

That's cool :)

And it's pretty much the same what my own Bundled Assets plugin does ... besides: my plugin also "compacts" Javascript and CSS by stripping things like comments and whitespace - and it still works on Rails 1.2 of course.

Huh. Wow!