Open johnnyshields opened 3 years ago
Hi @johnnyshields, thanks for the PR!
Your fix looks good, however, one small concern
image_tag user.avatar.url(:medium)
will lead to the following error - Nil location provided. Can't build URI.
So this change will hamper the ability to follow the common pattern of using the image_tag
as shown in the above example.
If the purpose of this PR is only to render nothing in place of a missing image, maybe, we should avoid returning nil
from the library so that the common code pattern shown above works safely.
If I set
Paperclip::Attachment.default_options[:default_url] = nil
(instead ofmissing.png
) Paperclip gives an error. This PR allows setting to nil, without changing any existing default behavior.