Class: Search::CertificationPresenter

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

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



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

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


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

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


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

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

#is_inactiveObject



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

def is_inactive
  h.y r.is_inactive
end

#stateObject



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

def state
  LocatorRecord.human_state_name(r.state)
end