Class: Search::SupplierItemPresenter

Inherits:
BasePresenter
  • Object
show all
Includes:
Presenters::Timeable
Defined in:
app/presenters/search/supplier_item_presenter.rb

Overview

Presenter: supplier item presenter.

Direct Known Subclasses

SupplierItemTextPresenter

Instance Attribute Summary

Attributes inherited from BasePresenter

#current_account, #options, #url_helper

Instance Method Summary collapse

Methods inherited from BasePresenter

#can?, #capture, #concat, #content_tag, #fa_icon, #h, #initialize, #link_to, #number_to_currency, #present, presents, #r, #safe_present, #simple_format, #u

Constructor Details

This class inherits a constructor from BasePresenter

Instance Method Details

#activeObject



14
15
16
# File 'app/presenters/search/supplier_item_presenter.rb', line 14

def active
  h.check_or_cross r.active
end


8
9
10
11
12
# File 'app/presenters/search/supplier_item_presenter.rb', line 8

def item_link
  return unless r.has_columns?(:sku, :item_id)

  h.link_to r.sku, h.item_path(r.item_id)
end