Class: Activity::ResourceList::SupportCaseRetriever

Inherits:
ResourceRetriever show all
Defined in:
app/services/activity/resource_list.rb

Instance Attribute Summary

Attributes inherited from ResourceRetriever

#page, #party, #per_page, #query

Instance Method Summary collapse

Methods inherited from ResourceRetriever

build, #filter_results, #initialize, #total_count

Constructor Details

This class inherits a constructor from Activity::ResourceList::ResourceRetriever

Instance Method Details

#resourcesObject



135
136
137
138
139
140
141
# File 'app/services/activity/resource_list.rb', line 135

def resources
  return unless party.respond_to?(:all_support_cases)

  support_cases = party.all_support_cases
  support_cases = support_cases.where('support_cases.case_number ILIKE ?', "'%#{query}%'") if query.present?
  filter_results(SupportCase, support_cases)
end