Class: Search::CreditApplicationPresenter
- Inherits:
-
BasePresenter
- Object
- SimpleDelegator
- BasePresenter
- Search::CreditApplicationPresenter
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/credit_application_presenter.rb
Overview
Row presenter for ViewCreditApplication — renders the cells in the CRM
credit-application search/results table.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BasePresenter
#current_account, #options, #url_helper
Instance Method Summary collapse
-
#credit_application ⇒ ActiveSupport::SafeBuffer?
Linked credit-application reference number → show page.
-
#customer ⇒ ActiveSupport::SafeBuffer?
Linked customer name → customer show page.
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
#credit_application ⇒ ActiveSupport::SafeBuffer?
Linked credit-application reference number → show page.
22 23 24 25 26 |
# File 'app/presenters/search/credit_application_presenter.rb', line 22 def credit_application return unless r.has_columns?(:reference_number, :id) h.link_to r.reference_number, h.credit_application_path(r.id) end |
#customer ⇒ ActiveSupport::SafeBuffer?
Linked customer name → customer show page.
13 14 15 16 17 |
# File 'app/presenters/search/credit_application_presenter.rb', line 13 def customer return unless r.has_columns?(:customer_id) h.link_to Customer.find(r.customer_id).full_name, h.customer_path(r.customer_id) end |