Class: QuickSearch::OrderPresenter
- Inherits:
-
PinPresenter
- Object
- PinPresenter
- QuickSearch::OrderPresenter
- Defined in:
- app/presenters/quick_search/order_presenter.rb
Instance Method Summary collapse
Instance Method Details
#build_title ⇒ Object
8 9 10 11 12 |
# File 'app/presenters/quick_search/order_presenter.rb', line 8 def build_title parts = [result.opportunity&.name, result.customer_reference] # Remove blank values, normalize strings, and deduplicate parts.map(&:presence).compact_blank.map(&:strip).uniq.join(' | ') end |
#set_attributes ⇒ Object
3 4 5 6 |
# File 'app/presenters/quick_search/order_presenter.rb', line 3 def set_attributes @title = build_title @sub_header = build_sub_header end |