Skip to content

Commit 5699080

Browse files
committed
Improve Asset Pipeline documentation [ci-skip]
- A dot was appearing in what was supposed to be a compound statement
1 parent 258e9ad commit 5699080

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

guides/source/asset_pipeline.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -865,23 +865,19 @@ config.asset_host = ENV['CDN_HOST']
865865
NOTE: You would need to set `CDN_HOST` on your server to `mycdnsubdomain
866866
.fictional-cdn.com` for this to work.
867867

868-
Once you have configured your server and your CDN when you serve a webpage that
869-
has an asset:
868+
Once you have configured your server and your CDN, asset paths from helpers such
869+
as:
870870

871871
```erb
872872
<%= asset_path('smile.png') %>
873873
```
874874

875-
Instead of returning a path such as `/assets/smile.png` (digests are left out
876-
for readability). The URL generated will have the full path to your CDN.
875+
Will be rendered as full CDN URLs like `http://mycdnsubdomain.fictional-cdn.com/assets/smile.png`
876+
(digest omitted for readability).
877877

878-
```
879-
http://mycdnsubdomain.fictional-cdn.com/assets/smile.png
880-
```
881-
882-
If the CDN has a copy of `smile.png` it will serve it to the browser and your
883-
server doesn't even know it was requested. If the CDN does not have a copy it
884-
will try to find it at the "origin" `example.com/assets/smile.png` and then store
878+
If the CDN has a copy of `smile.png`, it will serve it to the browser, and your
879+
server doesn't even know it was requested. If the CDN does not have a copy, it
880+
will try to find it at the "origin" `example.com/assets/smile.png`, and then store
885881
it for future use.
886882
887883
If you want to serve only some assets from your CDN, you can use custom `:host`

0 commit comments

Comments
 (0)