class Sessions::PatientSpecificDirectionsController
Public Instance Methods
Source
# File app/controllers/sessions/patient_specific_directions_controller.rb, line 25 def create PatientSpecificDirection.import!( psds_to_create, on_duplicate_key_ignore: true ) redirect_to session_patient_specific_directions_path(@session), flash: { success: "#{"PSD".pluralize(@eligible_for_bulk_psd_count)} added" } end
Source
# File app/controllers/sessions/patient_specific_directions_controller.rb, line 21 def new @eligible_for_bulk_psd_count = patients_allowed_psd.count end
Source
# File app/controllers/sessions/patient_specific_directions_controller.rb, line 10 def show scope = @session.patients.includes(:patient_specific_directions) @eligible_for_bulk_psd_count = patients_allowed_psd.count patients = @form.apply(scope) @pagy, @patients = pagy(patients) render layout: "session" end