Sha256: 5ee9c568c77d40b967df89e48ff23aad1fb1a8fea569e3241f2a1e3ffd256ad2
Contents?: true
Size: 769 Bytes
Versions: 10
Compression:
Stored size: 769 Bytes
Contents
# frozen_string_literal: true module Renalware module Letters class LettersInProgressComponent < ApplicationComponent pattr_initialize [:current_user!] # Note we want oldest letters ordered first here - elsewhere letters are newest first def letters_in_progress @letters_in_progress ||= begin present_letters( Letters::Letter .reversed .where("author_id = ? or created_by_id = ?", current_user.id, current_user.id) .in_progress .includes(:author, :patient, :letterhead) ) end end private def present_letters(letters) CollectionPresenter.new(letters, Letters::LetterPresenterFactory) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems