Don’t simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and thus always be true:
- if user.photo.present? # always true
= image_tag(user.photo.url)
Use #photo? instead:
- if user.photo?
= image_tag(user.photo.url)
user.photo.exists?
seems to actually beuser.photo.exists?(:original)
. For some reason I didn't have an 'original' for some of my older attachments and this caused the logic to fail even though the thumbnails etc... were there.