Sha256: 80a523bc71095e54556e0648c3eda185ab0dbd52f24334394a50e29c6c61cbf3

Contents?: true

Size: 713 Bytes

Versions: 27

Compression:

Stored size: 713 Bytes

Contents

require_dependency "renalware/modalities"

module Renalware
  module Modalities
    class ReasonsController < BaseController
      skip_after_action :verify_authorized

      def index
        @reason_hd_pd = HaemodialysisToPD.all
        @reason_pd_hd = PDToHaemodialysis.all

        modal_change_type = params[:modal_change_type]
        type = modal_change_type ? "Renalware::Modalities::#{modal_change_type.camelize}" : nil

        @modality_reason_select = Reason.where(type: type)

        respond_to do |format|
          format.html
          format.json {
            render json: @modality_reason_select.as_json(only: [:id, :rr_code, :description])
          }
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

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