Sha256: e0af1ed588fe8c8dad0e435d88b21888ec04392b5daa1ab0fd28b767d543b1ba
Contents?: true
Size: 550 Bytes
Versions: 15
Compression:
Stored size: 550 Bytes
Contents
# frozen_string_literal: true module Renalware module Admissions # rubocop:disable Rails/Pick class ActiveConsultAlertComponent < ApplicationComponent pattr_initialize [:current_user, :patient!] def consult_id @consult_id ||= begin Consult .where(patient_id: patient.id, ended_on: nil) .order(started_on: :desc) .pluck(:id) .first end end def render? consult_id.present? end end # rubocop:enable Rails/Pick end end
Version data entries
15 entries across 15 versions & 1 rubygems