Sha256: f6000b7305f8f03db5cc51c8ae8410bfb8278157c39f13adeb1ff012c215c78a

Contents?: true

Size: 606 Bytes

Versions: 116

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/patients"

module Renalware
  module Patients
    class WorryboardController < BaseController
      include Renalware::Concerns::Pageable

      def show
        authorize Worry, :index?
        query = WorryQuery.new(query_params)
        worries = query.call.page(page).per(per_page)
        render locals: {
          query: query.search,
          worries: worries,
          modalities: Modalities::Description.order(:name)
        }
      end

      private

      def query_params
        params.fetch(:q, {})
      end
    end
  end
end

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.1.0 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.167 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.166 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.165 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.164 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.163 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.162 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.161 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.160 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.159 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.158 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.157 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.156 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.155 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.153 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.152 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.151 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.149 app/controllers/renalware/patients/worryboard_controller.rb
renalware-core-2.0.148 app/controllers/renalware/patients/worryboard_controller.rb