Skip to content

Instantly share code, notes, and snippets.

@heliohead
Last active August 29, 2015 14:02
Show Gist options
  • Save heliohead/ea5205dc0ae076f23082 to your computer and use it in GitHub Desktop.
Save heliohead/ea5205dc0ae076f23082 to your computer and use it in GitHub Desktop.
<% @uploads.each do |upload| %>
<%= link_to image_tag(upload.img.url(:thumb), rel: "prettyPhoto"), image_path(upload.img.url(:original)) %>
<% end %>
output:
<a href="/system/uploads/imgs/000/000/016/original/pics06.jpg?1402887326"><img alt="Pics06" rel="prettyPhoto" src="/system/uploads/imgs/000/000/016/thumb/pics06.jpg?1402887326" /></a>
How to put "rel" in to anchor? instead image tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment