Class: Decidim::Conferences::OrganizationPrioritizedConferences
- Inherits:
-
Query
- Object
- Query
- Decidim::Conferences::OrganizationPrioritizedConferences
- Defined in:
- app/queries/decidim/conferences/organization_prioritized_conferences.rb
Overview
This query class filters public conferences given an organization in a meaningful prioritized order.
Instance Method Summary collapse
-
#initialize(organization, user = nil) ⇒ OrganizationPrioritizedConferences
constructor
A new instance of OrganizationPrioritizedConferences.
- #query ⇒ Object
Constructor Details
#initialize(organization, user = nil) ⇒ OrganizationPrioritizedConferences
Returns a new instance of OrganizationPrioritizedConferences.
8 9 10 11 |
# File 'app/queries/decidim/conferences/organization_prioritized_conferences.rb', line 8 def initialize(organization, user = nil) @organization = organization @user = user end |
Instance Method Details
#query ⇒ Object
13 14 15 16 17 18 |
# File 'app/queries/decidim/conferences/organization_prioritized_conferences.rb', line 13 def query Decidim::Query.merge( OrganizationPublishedConferences.new(@organization, @user), PrioritizedConferences.new ).query.with_attached_hero_image end |