Class: Search::ServiceJobPresenter
- Inherits:
-
BasePresenter
show all
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/service_job_presenter.rb
Instance Attribute Summary
#current_account, #options, #url_helper
Instance Method Summary
collapse
#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
#business_phone ⇒ Object
23
24
25
|
# File 'app/presenters/search/service_job_presenter.rb', line 23
def business_phone
h.number_to_phone(r.business_phone)
end
|
#cell_phone ⇒ Object
19
20
21
|
# File 'app/presenters/search/service_job_presenter.rb', line 19
def cell_phone
h.number_to_phone(r.cell_phone)
end
|
#completed_on ⇒ Object
31
32
33
|
# File 'app/presenters/search/service_job_presenter.rb', line 31
def completed_on
h.render_date(r.completed_on)
end
|
#customer_link ⇒ Object
6
7
8
9
|
# File 'app/presenters/search/service_job_presenter.rb', line 6
def customer_link
return unless r.has_columns?(:customer_full_name, :customer_id)
h.link_to r.customer_full_name, h.customer_path(r.customer_id)
end
|
#distance ⇒ Object
11
12
13
|
# File 'app/presenters/search/service_job_presenter.rb', line 11
def distance
"#{r.distance.to_f.round(2)} mi."
end
|
#home_phone ⇒ Object
15
16
17
|
# File 'app/presenters/search/service_job_presenter.rb', line 15
def home_phone
h.number_to_phone(r.home_phone)
end
|
#job_date ⇒ Object
27
28
29
|
# File 'app/presenters/search/service_job_presenter.rb', line 27
def job_date
h.render_date(r.job_date)
end
|