Class: Activity::ResourceList::RmaRetriever
- Inherits:
-
ResourceRetriever
- Object
- ResourceRetriever
- Activity::ResourceList::RmaRetriever
- Defined in:
- app/services/activity/resource_list.rb
Overview
Service object: rma retriever.
Instance Attribute Summary
Attributes inherited from ResourceRetriever
#page, #party, #per_page, #query
Instance Method Summary collapse
-
#resources ⇒ ActiveRecord::Relation<Rma>?
The party's RMAs 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<Rma>?
The party's RMAs matching the query.
209 210 211 212 213 214 215 |
# File 'app/services/activity/resource_list.rb', line 209 def resources return unless party.respond_to?(:rmas) rmas = party.rmas rmas = rmas.where(Rma[:rma_number].matches("%#{query}%")) if query.present? filter_results(Rma, rmas) end |