title: fancybox with image_tag and link_to rails
body: <p>Im using fancybox within my app for a gallery. All my images are stored in my model and I can display them like so</p>
  
  <pre><code>&lt;div class="container"&gt;
   &lt;% @portfolio.each do |l| %&gt;
    &lt;div class="four columns"&gt;
     &lt;div class="our-work"&gt;
      &lt;a class="fancybox" rel="group" href="#"&gt;
       &lt;%= image_tag(l.url_large, :size =&gt; "220x220") %&gt;
      &lt;/a&gt;
      &lt;h3&gt;&lt;%= truncate(l.title, :length =&gt; 20) %&gt;&lt;/h3&gt;
     &lt;/div&gt;
     &lt;/div&gt;
    &lt;% end %&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>What I am having trouble with is assigning the href so that when i click on an image a larger version of that same image is shown in a popup (fancybox).has anyone done this before or can anyone point me in the right direction please.</p>
  
  <p>Normally if i want to link to the object itself i would do something like this</p>
  
  <pre><code>&lt;%= link_to, l %&gt;
  </code></pre>
  
  <p>Can I do the same as what I am using now but just change the size</p>
  
  <pre><code>&lt;%= link_to, image_tag(l.url_large, :size =&gt; "480x480"), :class="fancybox %&gt;
  </code></pre>
  
  <p>Not really sure how to fit it all together</p>
  
  <p>Thanks</p>