Class: Decidim::Conferences::Admin::ConferenceSpeakers
- Inherits:
-
Query
- Object
- Query
- Decidim::Conferences::Admin::ConferenceSpeakers
- Defined in:
- app/queries/decidim/conferences/admin/conference_speakers.rb
Overview
A class used to find the ConferenceSpeakers’s by the search.
Class Method Summary collapse
-
.for(conference_speakers, query = nil) ⇒ Object
Syntactic sugar to initialize the class and return the queried objects.
Instance Method Summary collapse
-
#initialize(conference_speakers, query = nil) ⇒ ConferenceSpeakers
constructor
Initializes the class.
-
#query ⇒ Object
List the conference speakers by the different filters.
Constructor Details
#initialize(conference_speakers, query = nil) ⇒ ConferenceSpeakers
Initializes the class.
conference_speakers - the ConferenceSpeaker relation that need to be filtered query - query to filter user group names
20 21 22 23 |
# File 'app/queries/decidim/conferences/admin/conference_speakers.rb', line 20 def initialize(conference_speakers, query = nil) @conference_speakers = conference_speakers @query = query end |
Class Method Details
.for(conference_speakers, query = nil) ⇒ Object
Syntactic sugar to initialize the class and return the queried objects.
conference_speakers - the initial ConferenceSpeaker relation that needs to be filtered. query - query to filter user group names
12 13 14 |
# File 'app/queries/decidim/conferences/admin/conference_speakers.rb', line 12 def self.for(conference_speakers, query = nil) new(conference_speakers, query).query end |
Instance Method Details
#query ⇒ Object
List the conference speakers by the different filters.
26 27 28 29 |
# File 'app/queries/decidim/conferences/admin/conference_speakers.rb', line 26 def query @conference_speakers = filter_by_search(@conference_speakers) @conference_speakers end |