I was wondering if there was a way to override the asset host of an image.

For example lets say I have the following asset host and image tag

config.asset_host = "www.xxx.com
image_tag "blerg.gif"

This would out put and image tag with the scr:

www.xxx.com/blerg.gif

Is there a way to change the asset host inline for example:

image_tag "blerg.gif", :host => 'www.yyy.com

Which would change the asset host of the image.

Cheers.

Comments

you can pass your full url like image_tag "http://www.yyy.com/blerg.gif"

Written by nash

Yeah it just works, answer it and I'll give you a point :p

Written by Smickie

Accepted Answer

You can pass your full url: image_tag "http://www.yyy.com/blerg.gif"

Written by nash
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki