Class: Search::CertificationPresenter

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

Overview

Presenter: certification presenter.

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



24
25
26
# File 'app/presenters/search/certification_presenter.rb', line 24

def certification_link
  h.link_to(r.certification_reference, h.certification_path(r.certification_id)) if r.certification_id.present?
end


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

def course_link
  h.link_to(r.certification_name, h.course_enrollment_path(r.id))
end


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

def customer_link
  h.link_to(r.customer_name, h.customer_path(r.customer_id))
end

#is_inactiveObject



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

def is_inactive
  h.y r.is_inactive
end

#stateObject



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

def state
  LocatorRecord.human_state_name(r.state)
end