Sha256: 696af31857b92641c928c92a260d7adaf4c76186ea73ff809bae166688848b5d
Contents?: true
Size: 807 Bytes
Versions: 56
Compression:
Stored size: 807 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/letters" module Renalware module Letters class CompletedBatchesController < BaseController include Renalware::Concerns::Pageable # Renders a modal asking the user if they want to complete (ie mark as printed) # the batch. def new batch = find_and_authorize_batch render layout: false, locals: { batch: batch } end def create batch = find_and_authorize_batch Printing::CompleteBatch.new(user: current_user, batch: batch).call render layout: false, locals: { batch: batch } end private def find_and_authorize_batch Letters::Batch.find(params[:batch_id]).tap do |batch| authorize batch end end end end end
Version data entries
56 entries across 56 versions & 1 rubygems