Sha256: 3e0c48f00bd956091b4683c935c7144cd71d4b65b53947dcd65fffe36857151f

Contents?: true

Size: 492 Bytes

Versions: 142

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/letters"

module Renalware
  module Letters
    class RejectedLettersController < Letters::BaseController
      before_action :load_patient

      def create
        letter = @patient.letters.pending.find(params[:letter_id])
        draft_letter = letter.reject(by: current_user)
        draft_letter.save!

        redirect_to patient_letters_letter_path(@patient, draft_letter), notice: t(".success")
      end
    end
  end
end

Version data entries

142 entries across 142 versions & 1 rubygems

Version Path
renalware-core-2.0.147 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.146 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.145 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.144 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.143 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.142 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.141 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.140 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.139 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.138 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.137 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.136 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.135 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.134 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.133 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.132 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.131 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.130 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.129 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.128 app/controllers/renalware/letters/rejected_letters_controller.rb