Class: SolidLoop::Admin::LoopsQuery
- Defined in:
- app/queries/solid_loop/admin/loops_query.rb
Instance Attribute Summary
Attributes inherited from BaseQuery
Instance Method Summary collapse
- #call ⇒ Object
- #exact_match ⇒ Object
-
#initialize(params, scope: SolidLoop::Loop.order(created_at: :desc)) ⇒ LoopsQuery
constructor
A new instance of LoopsQuery.
Constructor Details
#initialize(params, scope: SolidLoop::Loop.order(created_at: :desc)) ⇒ LoopsQuery
Returns a new instance of LoopsQuery.
4 5 6 |
# File 'app/queries/solid_loop/admin/loops_query.rb', line 4 def initialize(params, scope: SolidLoop::Loop.order(created_at: :desc)) super end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/queries/solid_loop/admin/loops_query.rb', line 8 def call filtered = scope filtered = filtered.where(id: normalized_loop_id) if normalized_loop_id filtered = filtered.where(status: status) if status filtered = filtered.where(agent_class_name: agent_class_name) if agent_class_name filtered end |