How can I serve static content from outside of the project - rails
Without using a symlink, how can I serve images that ar开发者_开发百科e outside of the rails project? I though there might be some routes magic but I can find what I'm looking for...
Lets say images are at ~/images
and the application is at ~/app.
I think the ~/images is going to screw you up. Images becomes the public/images folder. However, if you were to name it ~/static_images then you could:
=image_tag("/static_images/my_cool_graph.png")
Alternatively, you could host ~/images in a vhost... so if you were http://joe.com then you could:
=image_tag("http://static.joe.com/images/my_cool_graph.png")
精彩评论