I have such structure(for example):
public
art_im
folder1
img01.jpg
what i need to write, to access this img01.jpg in tag? i try
= image_tag("#{Rails.root}/public/art_im/images_#{@graphics.id}/#{@grp.id}.jpg", :alt => "#{@art.nr}")
but i get in html
<img alt="lalala" src="/home/prog/project/Shop/public/art_im/images_32/214800.jpg">
but how to link on my server, and get this images?
When your app is run by webserver, its webroot will be the public
directory. So, this should work:
= image_tag("/art_im/images_#{@graphics.id}/#{@grp.id}.jpg", :alt => "#{@art.nr}")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With