Class: Search::OpportunityTextPresenter
- Inherits:
-
OpportunityPresenter
- Object
- OpportunityPresenter
- Search::OpportunityTextPresenter
- Defined in:
- app/presenters/search/opportunity_text_presenter.rb
Overview
Plain-text presenter for opportunity search results backed by ViewOpportunity.
Instance Method Summary collapse
-
#contact_link ⇒ String?
Returns the contact name as plain text, if available.
-
#customer_link ⇒ String?
Returns the customer name and number as plain text.
-
#opportunity_link ⇒ String
Returns the opportunity name as plain text.
Instance Method Details
#contact_link ⇒ String?
Returns the contact name as plain text, if available.
25 26 27 28 29 |
# File 'app/presenters/search/opportunity_text_presenter.rb', line 25 def contact_link return unless r.has_columns?(:contact_id, :contact_full_name) r.contact_full_name end |
#customer_link ⇒ String?
Returns the customer name and number as plain text.
18 19 20 |
# File 'app/presenters/search/opportunity_text_presenter.rb', line 18 def customer_link "#{r.customer_full_name} (CN#{r.customer_id})" end |
#opportunity_link ⇒ String
Returns the opportunity name as plain text.
11 12 13 |
# File 'app/presenters/search/opportunity_text_presenter.rb', line 11 def opportunity_link r.name end |