Class: Search::ItemPresenter

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

Direct Known Subclasses

ItemTextPresenter

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

#is_discontinuedObject



18
19
20
# File 'app/presenters/search/item_presenter.rb', line 18

def is_discontinued
  h.y r.is_discontinued
end


6
7
8
# File 'app/presenters/search/item_presenter.rb', line 6

def item_thumbnail_link
  h.item_thumbnail_link r
end


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

def name_with_link
  h.link_to r.name, h.item_path(r.id)
end


10
11
12
# File 'app/presenters/search/item_presenter.rb', line 10

def sku_with_link
  h.link_to r.sku, h.item_path(r.id)
end