Sha256: 3496268e135c8f4933877ab8817249f06bfe5bf14cf9a5b495415e9a6fda8aff
Contents?: true
Size: 422 Bytes
Versions: 19
Compression:
Stored size: 422 Bytes
Contents
require_dependency "renalware/drugs" module Renalware module Drugs class Type < ApplicationRecord self.table_name = "drug_types" has_many :classifications, foreign_key: :drug_type_id, dependent: :destroy has_many :drugs, through: :classifications include OrderedSetScope def self.for(*codes) includes(:drugs) .ordered_set(:code, codes) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems