Paperclip Default Url Missing.Png Location

Posted By Weston Ganger

<p>I thought this was kind of confusing and not well documented. All I wanted to do was make a quick and easy missing.png file in app/assets/images/ and have that be the no-file image. Turned out I needed to change the default_url in the posts model at the end of the line has_attachment</p>
<p>I changed it to this to use my one single image, app/assets/images/missing.png:</p>

has_attached_file :image1, 
  :styles => { :medium => "300x300>", :thumb => "150x150>" },
  :default_url => "missing.png"

Article Topic:Software Development - Ruby / Rails

Date:July 07, 2014