Class: Activity::ResourceList::SupportCaseRetriever
- Inherits:
-
ResourceRetriever
- Object
- ResourceRetriever
- Activity::ResourceList::SupportCaseRetriever
- Defined in:
- app/services/activity/resource_list.rb
Overview
Service object: support case retriever.
Instance Attribute Summary
Attributes inherited from ResourceRetriever
#page, #party, #per_page, #query
Instance Method Summary collapse
-
#resources ⇒ ActiveRecord::Relation<SupportCase>?
The party's support cases matching the query.
Methods inherited from ResourceRetriever
build, #filter_results, #initialize, #total_count
Constructor Details
This class inherits a constructor from Activity::ResourceList::ResourceRetriever
Instance Method Details
#resources ⇒ ActiveRecord::Relation<SupportCase>?
The party's support cases matching the query.
183 184 185 186 187 188 189 |
# File 'app/services/activity/resource_list.rb', line 183 def resources return unless party.respond_to?(:all_support_cases) support_cases = party.all_support_cases support_cases = support_cases.where(SupportCase[:case_number].matches("%#{query}%")) if query.present? filter_results(SupportCase, support_cases) end |