Default_url in Paperclip Broke with Asset Pipeline Upgrade

yellowreign picture yellowreign · Mar 10, 2012 · Viewed 14.9k times · Source

I'm using Paperclip and have a default_url option like this for one of my attachments:

:default_url => '/images/missing_:style.png'

The asset pipeline obviously doesn't like this since the directories moved. What's the best way to handle this? I have two styles for this picture (:mini and :thumb).

Answer

JofoCodin picture JofoCodin · Mar 19, 2012
:default_url => ActionController::Base.helpers.asset_path('missing_:style.png')

Then put the default images in app/assets/images/