Class: Renalware::Hospitals::WardPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Renalware::Hospitals::WardPresenter
- Defined in:
- app/presenters/renalware/hospitals/ward_presenter.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.units_with_wards ⇒ Object
16 17 18 |
# File 'app/presenters/renalware/hospitals/ward_presenter.rb', line 16 def self.units_with_wards Hospitals::Unit.eager_load(:wards).merge(Hospitals::Ward.active) end |
Instance Method Details
#title ⇒ Object
8 9 10 |
# File 'app/presenters/renalware/hospitals/ward_presenter.rb', line 8 def title code.blank? ? name : "#{name} (#{code})" end |
#title_including_unit ⇒ Object
12 13 14 |
# File 'app/presenters/renalware/hospitals/ward_presenter.rb', line 12 def title_including_unit "#{title} at #{hospital_unit.unit_code}" end |