Sha256: 0a9c46538451a503237ecb002c7cde4132270d4510711e8eab99e2b71faae76b
Contents?: true
Size: 837 Bytes
Versions: 15
Compression:
Stored size: 837 Bytes
Contents
module ProfilesHelper #Tells if the current subject accessing the profile is its owner or not def is_owner? if (current_subject.present?) and (@profile.present?) and (@profile.actor == current_subject.actor) return true else return false end end #Returns true if the "Personal Information" section is empty def is_personal_empty? if (@profile.organization?) or (@profile.birthday?) or (@profile.city?) or (@profile.description?) return false else return true end end #Returns true if the "Personal Information" section is empty def is_contact_empty? if (@profile.phone?) or (@profile.mobile?) or (@profile.fax?) or (@profile.address?)or (@profile.website?) or (@profile.subject.email?) return false else return true end end end
Version data entries
15 entries across 15 versions & 2 rubygems