Class: Renalware::Transplants::LiveDonorsQuery
- Inherits:
-
Object
- Object
- Renalware::Transplants::LiveDonorsQuery
show all
- Includes:
- ModalityScopes
- Defined in:
- app/models/renalware/transplants/live_donors_query.rb
Constant Summary
collapse
- DEFAULT_ORDER =
%w(family_name given_name).freeze
Instance Method Summary
collapse
#with_current_modality_matching, #with_current_modality_of_class
Constructor Details
9
10
11
|
# File 'app/models/renalware/transplants/live_donors_query.rb', line 9
def initialize(q = {})
@q = q
end
|
Instance Method Details
#call ⇒ Object
13
14
15
|
# File 'app/models/renalware/transplants/live_donors_query.rb', line 13
def call
search.result
end
|
#search ⇒ Object
17
18
19
20
21
22
23
|
# File 'app/models/renalware/transplants/live_donors_query.rb', line 17
def search
@search ||= begin
relation.search(q).tap do |search|
search.sorts = DEFAULT_ORDER
end
end
end
|