Sha256: 549a51773a0b3c0f6bc3979d333bd9b9fa47647bdb94243038c9b7264246bf0e
Contents?: true
Size: 574 Bytes
Versions: 15
Compression:
Stored size: 574 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/patients" module Renalware module Patients class Bookmark < ApplicationRecord acts_as_paranoid belongs_to :user, class_name: "Renalware::Patients::User" # No touch required on patient belongs_to :patient, class_name: "Renalware::Patient" validates :patient, presence: true validates :user, presence: true validates :user_id, uniqueness: { scope: [:patient_id, :deleted_at] } scope :ordered, -> { order(urgent: :desc, updated_at: :asc) } end end end
Version data entries
15 entries across 15 versions & 1 rubygems