title: check If images exists in rails
body: <p>I am adding images like this in rails project. I want to check If the image exists  and If not I want to use one common image for all the places where the images doesb't exist.</p>
  
  <p>Please help.</p>
  
  <pre><code>          &lt;div class = "col-sm-2"&gt; 
           &lt;center&gt; 
            &lt;%= image_tag pco.printable_photo.url(:small) %&gt;
            &lt;label&gt;
              &lt;%= pco.name %&gt;
            &lt;/label&gt;
          &lt;/center&gt;
        &lt;/div&gt;
  </code></pre>