Sha256: 4e226c054b07726b483d3794683c8dfca2c0dc3310ca1f71781eeb302dab0606
Contents?: true
Size: 553 Bytes
Versions: 9
Compression:
Stored size: 553 Bytes
Contents
require_dependency "renalware/patients" module Renalware module Patients class Bookmark < ApplicationRecord acts_as_paranoid belongs_to :user, class_name: "Renalware::Patients::User", foreign_key: :user_id belongs_to :patient, class_name: "Renalware::Patient", foreign_key: :patient_id validates :patient, presence: true validates :user, presence: true validates_uniqueness_of :user_id, scope: [:patient_id, :deleted_at] scope :ordered, -> { order(urgent: :desc, updated_at: :asc) } end end end
Version data entries
9 entries across 9 versions & 1 rubygems