Class: Search::PurchaseOrderTextPresenter
- Inherits:
-
PurchaseOrderPresenter
- Object
- PurchaseOrderPresenter
- Search::PurchaseOrderTextPresenter
- Defined in:
- app/presenters/search/purchase_order_text_presenter.rb
Overview
Text-only row presenter for PurchaseOrderSearch — renders the same cells as
PurchaseOrderPresenter but without HTML links, for CSV/Excel export
or other plain-text consumers.
Instance Method Summary collapse
-
#purchase_order_link ⇒ String
Purchase order reference number.
-
#supplier_link ⇒ String?
Supplier name; nil when the user lacks read permission or the required columns are not selected.
Instance Method Details
#purchase_order_link ⇒ String
Purchase order reference number.
10 11 12 |
# File 'app/presenters/search/purchase_order_text_presenter.rb', line 10 def purchase_order_link r.reference_number end |
#supplier_link ⇒ String?
Supplier name; nil when the user lacks read permission or the required
columns are not selected.
18 19 20 21 22 |
# File 'app/presenters/search/purchase_order_text_presenter.rb', line 18 def supplier_link return unless r.has_columns?(:supplier_full_name, :supplier_id) && h.can?(:read, Supplier) r.supplier_full_name end |