Class: Search::ItemPresenter

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

Overview

Presenter: item presenter.

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



20
21
22
# File 'app/presenters/search/item_presenter.rb', line 20

def is_discontinued
  h.y r.is_discontinued
end


8
9
10
# File 'app/presenters/search/item_presenter.rb', line 8

def item_thumbnail_link
  h.item_thumbnail_link r
end


16
17
18
# File 'app/presenters/search/item_presenter.rb', line 16

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


12
13
14
# File 'app/presenters/search/item_presenter.rb', line 12

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