Class: QuickSearch::ContactPresenter
- Inherits:
-
PinPresenter
- Object
- PinPresenter
- QuickSearch::ContactPresenter
- Defined in:
- app/presenters/quick_search/contact_presenter.rb
Overview
Presents a Contact as a quick search result / pinned item.
Instance Method Summary collapse
-
#profile_image_url ⇒ String?
The contact's 80x80 profile image URL, or nil.
-
#set_attributes ⇒ void
Sets the card title and badge sub-header.
Instance Method Details
#profile_image_url ⇒ String?
Returns the contact's 80x80 profile image URL, or nil.
16 17 18 19 20 |
# File 'app/presenters/quick_search/contact_presenter.rb', line 16 def profile_image_url return if result.profile_image.blank? result.profile_image.image_url(width: 80, height: 80) end |
#set_attributes ⇒ void
This method returns an undefined value.
Sets the card title and badge sub-header.
10 11 12 13 |
# File 'app/presenters/quick_search/contact_presenter.rb', line 10 def set_attributes @title = result.full_name @sub_header = build_sub_header end |