Class: Search::SupportCasePresenter
- Inherits:
-
BasePresenter
- Object
- SimpleDelegator
- BasePresenter
- Search::SupportCasePresenter
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/support_case_presenter.rb
Direct Known Subclasses
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
#participants ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/presenters/search/support_case_presenter.rb', line 10 def participants h.capture do h.content_tag :ul, class: 'list-unstyled' do r.support_case_participants.select(&:party).each do |scp| h.concat h.content_tag :li, h.link_to(scp.party.full_name, h.polymorphic_path(scp.party)) end end end end |
#rooms ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'app/presenters/search/support_case_presenter.rb', line 20 def rooms h.capture do h.content_tag :ul, class: 'list-unstyled' do r.room_configurations.each do |rc| h.concat h.content_tag :li, h.link_to(rc.reference_number, h.room_configuration_path(rc.id)) end end end end |
#support_case_link ⇒ Object
6 7 8 |
# File 'app/presenters/search/support_case_presenter.rb', line 6 def support_case_link h.link_to r.case_number, h.support_case_path(r.id) end |