class Patients::ArchiveController
Public Instance Methods
Source
# File app/controllers/patients/archive_controller.rb, line 10 def create @form = PatientArchiveForm.new( current_user:, patient: @patient, **patient_archive_form_params ) if @form.save flash[:success] = "This record has been archived" redirect_to patient_path( @form.duplicate? ? @form.existing_patient : @patient ) else render :new, status: :unprocessable_entity end end
Source
# File app/controllers/patients/archive_controller.rb, line 6 def new @form = PatientArchiveForm.new end