Sha256: b052828e85283451896d8525b99f9019a50eb6b92555657cc9a144632d5ad321
Contents?: true
Size: 490 Bytes
Versions: 15
Compression:
Stored size: 490 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/hd" module Renalware module HD class Station < ApplicationRecord include Accountable include Sortable belongs_to :location, class_name: "HD::StationLocation" validates :hospital_unit_id, presence: true validates :name, uniqueness: { scope: :hospital_unit_id } scope :for_unit, ->(id) { where(hospital_unit_id: id) } scope :ordered, -> { order(position: :asc) } end end end
Version data entries
15 entries across 15 versions & 1 rubygems