How do I display the image in a view?
The documentation says:
<%= image_tag formatted_photo_path(@photo, :开发者_开发问答jpg) %>
This is not what I want.
I just want to display an image on a view I don't care about the url.
E.g., Avatar.
Do I need to write a path to the directory or is a method already made?
/public/images/avatar/id
Thank you
Does the example above not render something like this to the view?
<img src="/path-to-generated-image.jpg"/>
精彩评论