Class: QuickSearch::PaymentPresenter
- Inherits:
-
PinPresenter
- Object
- PinPresenter
- QuickSearch::PaymentPresenter
- Defined in:
- app/presenters/quick_search/payment_presenter.rb
Overview
Presents a Payment as a quick search result / pinned item, resolving the
card to the payment's order.
Instance Method Summary collapse
-
#set_attributes ⇒ void
Sets the card title, badge sub-header, order reference, link, and result class.
Instance Method Details
#set_attributes ⇒ void
This method returns an undefined value.
Sets the card title, badge sub-header, order reference, link, and result class.
11 12 13 14 15 16 17 |
# File 'app/presenters/quick_search/payment_presenter.rb', line 11 def set_attributes @title = [result.order&.recipient_name, h.render_date(result.order&.created_at)].map(&:presence).compact_blank.join(' | ') @sub_header = build_sub_header @reference_number = result.order&.reference_number @link = h.order_path(result.order_id) set_result_class(result.order) end |