title: How do I link_to VIEW a pdf resource (NOT download) in a custom engine on RefineryCMS?
body: <p>I'm a novice RoRr and I'm building my company's website on RefineryCMS. </p>
  
  <p>I've properly created an engine for my Boss' publications, within which I included a pdf:resource column and have uploaded all the articles to my backend. Everything works - renders properly and downloads work. </p>
  
  <p>HOWEVER, I also want to be able to view those pdf's as a _blank target through a link_to on the article.title. SEE CODE BELOW !!!XXXXXXXXX_path , or any useable variation, is what I'm looking for!!!</p>
  
  <p>The important thing is that the corresponding PDF is being rendered. That is, I know I can't manually code individual links while using the [.each do] loop.</p>
  
  <p>I'm sure there is a way to get this done but, as I said, I'm a novice and could use some help. </p>
  
  <p>here's the code: </p>
  
  <pre><code>&lt;section id="body_content"&gt;
  &lt;section id="body"&gt;
      &lt;section id=articles&gt;
          &lt;% @articles.each do |article| %&gt;
              &lt;div class=wrapper&gt;
                  &lt;div class=particle&gt;
                      &lt;h1&gt;&lt;%= link_to article.title, **(XXXXXXXXXXXXXXX.pdf)**, :target =&gt; '_blank' %&gt;&lt;/h1&gt;
                          &lt;p&gt;&lt;span class=publisher&gt;&lt;%= article.publication %&gt;&lt;/span&gt;,
                              &lt;span class=year&gt;&lt;%= article.year %&gt;&lt;/span&gt;
                          &lt;/p&gt;
                      &lt;% if article.pdf.present? %&gt;
                          &lt;%= link_to image_tag("/assets/pdf.png", :size =&gt; "30x30"), article.pdf.url, :title =&gt; "PDF download", :class =&gt; "pdflink" %&gt;
                      &lt;% else %&gt;
                          pdf
                      &lt;% end %&gt;
                  &lt;/div&gt;
              &lt;% end %&gt;
          &lt;/div&gt;
      &lt;/section&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p></p>
  
  <p>Any help is much appreciated.</p>
  
  <p><em><strong></em></strong>*SIDE NOTE: my next task is to add a link to email the article (as an attachment) to a third party. Again, I'd imagine there's something in ActionMailer that can help with this but any help before I get started would be great. </p>
  
  <p>much obliged.</p>