-
-
Save andru255/56ec43c0df72b146cac4 to your computer and use it in GitHub Desktop.
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 all assets from CDN server | |
| config.action_controller.asset_host = 'http://cdn.mydomain.com' | |
| #or if your files in a folder on CDN server | |
| config.action_controller.asset_host = 'http://cdn.mydomain.com/myfolder' | |
| # serve only images | |
| config.action_controller.asset_host = Proc.new { |source| | |
| if source =~ /\b(.png|.jpg|.gif)\b/i | |
| "http://cdn.mydomain.com" | |
| end | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment