Class: Decidim::Conferences::OrganizationPublishedConferences
- Inherits:
-
Query
- Object
- Query
- Decidim::Conferences::OrganizationPublishedConferences
- Defined in:
- app/queries/decidim/conferences/organization_published_conferences.rb
Overview
This query class filters published conferences given an organization.
Instance Method Summary collapse
-
#initialize(organization, user = nil) ⇒ OrganizationPublishedConferences
constructor
A new instance of OrganizationPublishedConferences.
- #query ⇒ Object
Constructor Details
#initialize(organization, user = nil) ⇒ OrganizationPublishedConferences
Returns a new instance of OrganizationPublishedConferences.
7 8 9 10 |
# File 'app/queries/decidim/conferences/organization_published_conferences.rb', line 7 def initialize(organization, user = nil) @organization = organization @user = user end |
Instance Method Details
#query ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/queries/decidim/conferences/organization_published_conferences.rb', line 12 def query Decidim::Query.merge( OrganizationConferences.new(@organization), VisibleConferences.new(@user), PublishedConferences.new ).query.order(weight: :asc, start_date: :desc) end |