Reputation: 109
I use paperclip and want to display document link in show page. I am using
<%= image_tag @event.photo.url(:small) %>
Problem is that it will not display link. also for image I only want to show link not thumbnail.How can it possible?? Please help!
Upvotes: 0
Views: 1235
Reputation: 372
If you want get original photo by click on link do:
<%= link_to image_tag(@event.photo.url(:small)), @event.photo.url(:original) %>
Upvotes: 3
Reputation: 115511
The link is simply:
<%= @event.photo.url(:small) %>
image_tag
is a helper creating the proper html tags to display the picture.
<%= link_to "pic name here", @event.photo.url(:small) %>
Upvotes: 1