Question: I'm trying to put in a rel and class attribute inside a anchor tag but it keeps going into the img tag. I'm fairly new to Rails so I'm hoping can see what i'm doing wrong.

```
  <% @series.uploads.each do |upload| %>
  <%= link_to  image_tag upload.upload.url(:thumb), :class => 'lightbox', :rel =>        'lightbox'%>
  <% end %>

```

Here is the output.

```
   <a href="/project-gallery">
   <img alt="alt" class="lightbox" rel="lightbox" src="img-path" />
   </a>

```

Answer: 
This?

```
<%= link_to(image_tag(upload.upload.url(:thumb)), :class => 'lightbox', :rel => 'lightbox') %>

```
This is what I ended up doing to get it to work but it just doesn't look right?

```
  <% @series.uploads.each do |upload| %>
   <%= link_to(image_tag(upload.upload.url(:thumb)), '', {:rel => "lightbox", :class => "lightbox"})%>
  <% end %>

```