Module: Renalware::Patients::BookmarksQuery::RansackScopes

Defined in:
app/models/renalware/patients/bookmarks_query.rb

Class Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



38
39
40
41
42
43
44
45
# File 'app/models/renalware/patients/bookmarks_query.rb', line 38

def self.extended(base)
  # Using a custom ransacker here in order to sort by modality description name
  # because using a predicate like  :patient_current_modality_description_name
  # results in an INNER JOIN onto modalities.
  base.ransacker :modality_desc do
    Arel.sql("modality_descriptions.name")
  end
end