#11 √ resolved
Chris Olsen

Method to see if file exists

Reported by Chris Olsen | April 17th, 2008 @ 10:27 PM

It would be nice to have a method to see whether a photo exists. ie user.has_photo? Right now the only was that I can think of to do this is user.photo_file_name.blank? but I think has_photo? is a little cleaner.

Thanks Jon.

Comments and changes to this ticket

  • Jon Yurek

    Jon Yurek April 18th, 2008 @ 01:33 PM

    • → State changed from “new” to “resolved”
    • → Assigned user changed from “” to “Jon Yurek”

    You can already use a generated ? method to see if a file exists. "user.photo?" will return true or false depending on whether or not "user.photo.file" is nil.

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket