Sha256: e386fc333c7df798bac766b671dc703919569c5cfa3ffa89da380375cc21e20b

Contents?: true

Size: 528 Bytes

Versions: 18

Compression:

Stored size: 528 Bytes

Contents

require_dependency "renalware/patients"

module Renalware
  module Patients
    class PracticesController < BaseController
      # Search for GP Practices matching part of a name
      def search
        authorize Practice, :search?
        respond_to do |format|
          format.json do
            render json: practices_matching_search_term
          end
        end
      end

      private

      def practices_matching_search_term
        PracticeSearchQuery.new(search_term: params[:q]).call
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
renalware-core-2.0.5 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.4 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.3 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.2 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.1 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc13 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc11 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc10 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc9 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc8 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc7 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc6 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc5 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc4 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc3 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.rc1 app/controllers/renalware/patients/practices_controller.rb
renalware-core-2.0.0.pre.beta12 app/controllers/renalware/patients/practices_controller.rb