Sha256: 213f78a63650d4c446e3b9901834814140f7fea1dc64c46aa655cf97f1a9a39e
Contents?: true
Size: 655 Bytes
Versions: 8
Compression:
Stored size: 655 Bytes
Contents
require_dependency "renalware/pathology" module Renalware module Pathology class Observation < ApplicationRecord belongs_to :request, class_name: "ObservationRequest", touch: true belongs_to :description, class_name: "ObservationDescription" validates :description, presence: true validates :result, presence: true validates :observed_at, presence: true scope :ordered, -> { order(observed_at: :desc) } scope :for_description, ->(description) { where(description: description) } def observed_on observed_at.to_date end def to_s result.to_s end end end end
Version data entries
8 entries across 8 versions & 1 rubygems