Class: Rails::Contact::Contact
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Rails::Contact::Contact
- Defined in:
- app/models/rails/contact/contact.rb
Instance Method Summary collapse
Instance Method Details
#full_name ⇒ Object
19 20 21 |
# File 'app/models/rails/contact/contact.rb', line 19 def full_name [ given_name, family_name ].compact.join(" ").strip end |
#primary_email ⇒ Object
23 24 25 |
# File 'app/models/rails/contact/contact.rb', line 23 def primary_email emails.find(&:primary?) || emails.first end |
#primary_phone ⇒ Object
27 28 29 |
# File 'app/models/rails/contact/contact.rb', line 27 def primary_phone phones.find(&:primary?) || phones.first end |