Class: Search::OpportunitySummaryPresenter
- Inherits:
-
BasePresenter
- Object
- SimpleDelegator
- BasePresenter
- Search::OpportunitySummaryPresenter
- Defined in:
- app/presenters/search/opportunity_summary_presenter.rb
Overview
Summary presenter for a collection of opportunity search results.
Instance Attribute Summary
Attributes inherited from BasePresenter
#current_account, #options, #url_helper
Instance Method Summary collapse
-
#value ⇒ String
Returns the total value of the result collection formatted as currency.
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
#value ⇒ String
Returns the total value of the result collection formatted as currency.
13 14 15 |
# File 'app/presenters/search/opportunity_summary_presenter.rb', line 13 def value h.number_to_currency(results.to_a.sum { |i| i.value || 0.00 }) end |