I want to display a default avatar image if someone has not added a photo. I’m assuming I need to either do a custom getter in the model or a helper.
If I did the getter would it look something like this:
def avatar_url
"default_url" unless self.avatar
end
Use the
read_attributemethod to detect the presence.