Skip to content

Instantly share code, notes, and snippets.

@Gregg
Created January 24, 2009 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gregg/51341 to your computer and use it in GitHub Desktop.
Save Gregg/51341 to your computer and use it in GitHub Desktop.
# Combining all your javascripts in production mode
<%= javascript_include_tag :all, :cache => true %>
<%= javascript_include_tag :all, :cache => "main" %>
<%= javascript_include_tag "product", "cart", "checkout", :cache => "shop" %>
# Same sort of stuff with stylesheets
<%= stylesheet_link_tag :all, :cache => true %>
# Declaring an asset host
ActionController::Base.asset_host = "assets.example.com"
# What uses the asset host url
<%= image_tag 'title.gif' %>
<%= javascript_include_tag :all %>
<%= stylesheet_link_tag :all %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment