So I am having this issue with ruby, the following code explains what is going on
def image_full(img,options)
if Jjdowns::Application.assets.find_asset("#{img}").nil?
image_full = image_tag("#{img}",options)
else
image_full = image_tag("app/no-image-large.png", options)
end
end
What i am trying to do is run a check if an image exists on my asset server then if it exists show the original image. If there is no image found on the asset server then i want to show a default image.
This code block works for showing the image but the part about showing the default image does not function.
So far my research has turned up nothing in the way of a solution to this issue.
Just to clarify the asset server is a in house “CDN” server and the default image is located on the asset server.
The solution to the problem ended up being the following
The key thing here was that we have an external asset host running on a separate server, and that was the initial problem.