# File lib/buweb/profile_photo.rb, line 30 def primary? person.profile_photo == self end
class ProfilePhoto
Public Instance Methods
clear_person_profile_photo_if_primary()
click to toggle source
# File lib/buweb/profile_photo.rb, line 38 def clear_person_profile_photo_if_primary person.update_attribute(:profile_photo_id, nil) if self.primary? end
make_primary()
click to toggle source
# File lib/buweb/profile_photo.rb, line 34 def make_primary person.update_attribute(:profile_photo_id, self.id) end
primary?()
click to toggle source