0

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?

2 Answers 2

3

Just tell rails it is an image:

<%= image_tag @truck_fleet.avatar.url(:medium) %>
Sign up to request clarification or add additional context in comments.

Comments

1

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) %>"/>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.