I am trying to include a url in my seeds file that is then pulled into another file depending on the id passed in so that a different image is displayed for each id.
In my seeds file I have
thing1 = Thing.new({"name"=>"Thing", "logo"=>"/thing.png"})
And then I am trying to pass it into my show.erb file
<h1><img src="<% @thing.find_thing.logo %>" ></h1>
It doesn't throw an error, but no image is displayed. If I replace
<% @thing.find_thing.logo %>
with the image filename, on the show.erb file then the image appears but this doesn't allow it to be varied depending on the ID being called in the page.
Hope that all make sense.
TIA