JuanVqz/doctors

View on GitHub
app/controllers/patients/appointments_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module Patients
  class AppointmentsController < ApplicationController
    def index
      @patient = current_hospital.patients.includes(:appointments).find(params[:patient_id])
      @pagy, @appointments = pagy(@patient.appointments)
    end
  end
end