Class: Account
- Inherits:
-
MLS::Model
- Object
- ActiveRecord::Base
- MLS::Model
- Account
- Includes:
- MLS::Avatar, MLS::Slugger
- Defined in:
- lib/mls/account.rb
Instance Method Summary collapse
Methods included from MLS::Avatar
Instance Method Details
#company_name ⇒ Object
49 50 51 52 |
# File 'lib/mls/account.rb', line 49 def company_name return organization.name if organization return company end |
#email_address ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/mls/account.rb', line 33 def email_address if email_addresses.loaded? email_addresses.to_a.find{|p| p.primary }.try(:address) else email_addresses.primary.try(:address) end end |
#phone ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/mls/account.rb', line 41 def phone if phones.loaded? phones.to_a.find{|p| p.primary }.try(:number) else phones.primary.try(:number) end end |