Reputation: 2662
In my show view:<dd><%= @truck_fleet.avatar.url(:medium) %></dd>
Get the output: /system/truck_fleets/avatars/000/000/001/medium/logo.thumbnail.png?1354107497
Def, I would like to display avatar instead for URL :)
Anyone has encountered this issue before?
Upvotes: 0
Views: 106
Reputation: 2223
Just tell rails it is an image:
<%= image_tag @truck_fleet.avatar.url(:medium) %>
Upvotes: 3
Reputation: 2274
All you need to do is wrap the URL in an <img>
tag under the src
attribute like this:
<img src="<%= @truck_fleet.avatar.url(:medium) %>"/>
Upvotes: 1