Sha256: ac70cb63610f52c61e1d86bbbbf4a3ad59aebc76a1219da2d89b657cdf936a5c
Contents?: true
Size: 425 Bytes
Versions: 35
Compression:
Stored size: 425 Bytes
Contents
require "document/enum" module Renalware class DatedTest < NestedAttribute attribute :result, Document::Enum, enums: %i(negative positive not_done) attribute :recorded_on, Date validates :recorded_on, timeliness: { type: :date, allow_blank: true } def to_s datestamp = recorded_on.present? ? "(#{I18n.l(recorded_on)})" : nil [result.try(:text), datestamp].compact.join(" ") end end end
Version data entries
35 entries across 35 versions & 1 rubygems