Sha256: 7d763ac80126d0eb19952ee04bde9dada71c8ee264924ac0e6e3dcd27c241295
Contents?: true
Size: 670 Bytes
Versions: 51
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module Renalware module Transplants class LiveDonorsQuery include ModalityScopes DEFAULT_ORDER = %w(family_name given_name).freeze def initialize(q = {}) @q = q end def call search.result end def search @search ||= begin relation.search(q).tap do |search| search.sorts = DEFAULT_ORDER end end end private def relation Patient .all .extending(ModalityScopes) .with_current_modality_of_class(DonorModalityDescription) end attr_reader :q end end end
Version data entries
51 entries across 51 versions & 1 rubygems