Sha256: 0ba1bf5570fcd91e9aa260ae9bbc93f955f39eb986a8642c9e6898cf8a9b311c
Contents?: true
Size: 484 Bytes
Versions: 17
Compression:
Stored size: 484 Bytes
Contents
# frozen_string_literal: true module Renalware module Events class BiopsiesComponent < ApplicationComponent validates :patient, presence: true def initialize(patient:, limit: 6) @patient = patient relation = Biopsy.for_patient(patient).includes(:created_by) @biopsies = relation.limit(limit).ordered @total_biopsies = relation.count end private attr_reader :patient, :biopsies, :total_biopsies end end end
Version data entries
17 entries across 17 versions & 1 rubygems