Created
December 20, 2012 23:40
-
-
Save toolmantim/4349610 to your computer and use it in GitHub Desktop.
How to serve up JS assets from your app URL, and all other assets from a CDN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Serve images and stylesheets (but not JS files) from a CDN | |
| config.action_controller.asset_host = Proc.new {|source| | |
| source !~ /\.js$/ ? "mycdn.com" : nil | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment