Rails image_tag prefix to a static content

Posted by pepernik on Stack Overflow See other posts from Stack Overflow or by pepernik
Published on 2010-04-23T08:38:36Z Indexed on 2010/04/23 8:43 UTC
Read the original article Hit count: 325

I would like to server all static content from a different domain like static.mydomain.com. Is there an option every image_tag, javascript_include_tag and stylesheet_link_tag would automatically add a prefix to that static domain?

Example:

image_tag '/images/img1.png'
would generate
http://static.mydomain.com/images/img1.png

Thx10x.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about static-content