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.104 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.103 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.102 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.101 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.100 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.99 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.98 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.97 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.96 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.95 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.94 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.93 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.92 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.91 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.90 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.89 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.88 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.87 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.86 app/controllers/renalware/letters/rejected_letters_controller.rb
renalware-core-2.0.85 app/controllers/renalware/letters/rejected_letters_controller.rb