thoughtbot/paperclip — Issue #746: expiring_url method return nil instead of the path to the :default_url missing image
Author: ccheaton
Created: 2012-02-17 19:37:23+00:00
State: open

I'm using `authenticated_read` with s3, so i have to use `@user.pic.expiring_url(3600,"original)` style calls to images. The problem is that if the user doesn't have a pic, the `expiring_url` method returns nil instead of the path specified to the `:default_url` missing image. The nil value caused my app to crash, so I had to write a helper method to check whether the expiring_url call returned nil prior to displaying the image (which causes a performance problem).

Expected behavior: `expiring_url` should return the `default_url` "missing" image instead of nil.