diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-16 13:31:06 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-16 13:31:20 -0300 |
commit | 3acf28773b5eebb09f720b7e343b9f3a1911d2e0 (patch) | |
tree | 967c722dc573cfed3e627cf9930ee50d74b54ece /guides | |
parent | 8c48cd220648dc05c17def63d653fa98c3fab4de (diff) | |
parent | db9a5c5a1f8e2a1590f0ac9436587d58a67a629e (diff) | |
download | rails-3acf28773b5eebb09f720b7e343b9f3a1911d2e0.tar.gz rails-3acf28773b5eebb09f720b7e343b9f3a1911d2e0.tar.bz2 rails-3acf28773b5eebb09f720b7e343b9f3a1911d2e0.zip |
Merge pull request #15021 from hubertlepicki/allow_custom_host_in_asset_url
Allow custom asset host to be passed in asset_url
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/asset_pipeline.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md index 52fc9726d9..950cfdca29 100644 --- a/guides/source/asset_pipeline.md +++ b/guides/source/asset_pipeline.md @@ -913,6 +913,14 @@ that it plays nicely with the pipeline. You may find quirks related to your specific set up, you may not. The defaults nginx uses, for example, should give you no problems when used as an HTTP cache. +If you want to serve only some assets from your CDN, you can use custom +`:host` option of `asset_url` helper, which overwrites value set in +`config.action_controller.asset_host`. + +```ruby +asset_url 'image.png', :host => 'http://cdn.example.com' +``` + Customizing the Pipeline ------------------------ |