Sha256: 5f1d27f35445c3fc916c407a7e15d242b9cf71f2db6a75f074cdaa14bbfe15f1
Contents?: true
Size: 799 Bytes
Versions: 16
Compression:
Stored size: 799 Bytes
Contents
require_dependency "renalware/letters" module Renalware module Letters class CompletedLettersController < Letters::BaseController before_action :load_patient # HTML GET for insertion into modal dialog def new render layout: false, locals: { letter: letter } end def create CompleteLetter.build(letter).call(by: current_user) respond_to do |format| format.html do redirect_to patient_letters_letter_path(@patient, letter), notice: t(".success") end format.js do render locals: { letter: letter } end end end private def letter @letter ||= @patient.letters.approved.find(params[:letter_id]) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems