Class: Renalware::Hospitals::WardsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- Renalware::Hospitals::WardsController
- Defined in:
- app/controllers/renalware/hospitals/wards_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Instance Method Details
#index ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/renalware/hospitals/wards_controller.rb', line 8 def index Ward, :index? unit = Unit.find(params[:unit_id]) wards = Ward.where(hospital_unit_id: unit.id).order(name: :asc).select(:id, :name) respond_to do |format| format.json do render json: wards.to_json end end end |