Sha256: 7232a0d37c235331f413dcbeb5aa2b65d1937f8917e2e0a22383f612ce4728af

Contents?: true

Size: 452 Bytes

Versions: 29

Compression:

Stored size: 452 Bytes

Contents

require_dependency "renalware/hospitals"

module Renalware
  module Hospitals
    class WardsController < BaseController
      def index
        authorize 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
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
renalware-core-2.0.16 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.15 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.14 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.13 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.12 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.11 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.9 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.8 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.7 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.5 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.4 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.3 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.2 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.1 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.0 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.0.pre.rc13 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.0.pre.rc11 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.0.pre.rc10 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.0.pre.rc9 app/controllers/renalware/hospitals/wards_controller.rb
renalware-core-2.0.0.pre.rc8 app/controllers/renalware/hospitals/wards_controller.rb