Sha256: 9e44b023a05afade8e91b400906323ca7af64cf30ecfc2055489e79ad0045a99
Contents?: true
Size: 503 Bytes
Versions: 64
Compression:
Stored size: 503 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/hospitals" module Renalware module Hospitals class Ward < ApplicationRecord belongs_to :hospital_unit, class_name: "Hospitals::Unit", inverse_of: :wards validates :hospital_unit, presence: true validates :name, presence: true, uniqueness: { scope: :hospital_unit_id } scope :ordered, -> { order(:name) } scope :active, -> { where(active: true) } def to_s name end end end end
Version data entries
64 entries across 64 versions & 1 rubygems