Class: QuickSearch::VoucherPresenter

Inherits:
PinPresenter
  • Object
show all
Defined in:
app/presenters/quick_search/voucher_presenter.rb

Overview

Presents a Voucher as a quick search result / pinned item.

See Also:

Instance Method Summary collapse

Instance Method Details

#set_attributesvoid

This method returns an undefined value.

Sets the card title (supplier or reference number) and badge sub-header.



10
11
12
13
# File 'app/presenters/quick_search/voucher_presenter.rb', line 10

def set_attributes
  @title = result.supplier&.full_name || result.reference_number
  @sub_header = build_sub_header
end