ich habe diese Art von Codezugewandt Problem mit Bild-URL im Produktionsmodus
module PhotosHelper
def photo_default_image_url(photo)
if photo.image_url == "/assets/image.jpg"
URI.join(root_url, "/assets/image.jpg")
else
photo.image_url(:thumb)
end
end
end
and image code is
<img src="<%= photo_default_image_url(@photo) %>">
seine Arbeits fein für die Entwicklung Stimmung.
bekam ich URL wie dies für Bild
http://localhost:3000/assets/image.jpg
aber es ist nicht in der Produktion Stimmung, wie dies für
Ich habe Arbeits url Bild
/image.jpg
mir bitte helfen dieses Problem zu lösen. danke