Sha256: a737ecfebb78ed601b68371cab42fe3c083653cab7600245be81bbb1f584d820
Contents?: true
Size: 751 Bytes
Versions: 149
Compression:
Stored size: 751 Bytes
Contents
# frozen_string_literal: true module Renalware module ModalityScopes def with_current_modality_matching(modality_names) joins(:modality_descriptions) .where( modality_descriptions: { name: Array(modality_names) }, modality_modalities: { state: "current", ended_on: nil }) .includes(:modality_description) end def with_current_modality_of_class(klass) joins(:modality_descriptions) .where( modality_descriptions: { type: klass.name }, modality_modalities: { state: "current", ended_on: nil }) .includes(:modality_description) end end end
Version data entries
149 entries across 149 versions & 1 rubygems