Class: Decidim::Conferences::OrganizationConferences
- Inherits:
-
Query
- Object
- Query
- Decidim::Conferences::OrganizationConferences
- Defined in:
- app/queries/decidim/conferences/organization_conferences.rb
Overview
This query class filters all conferences given an organization.
Instance Method Summary collapse
-
#initialize(organization) ⇒ OrganizationConferences
constructor
A new instance of OrganizationConferences.
- #query ⇒ Object
Constructor Details
#initialize(organization) ⇒ OrganizationConferences
Returns a new instance of OrganizationConferences.
7 8 9 |
# File 'app/queries/decidim/conferences/organization_conferences.rb', line 7 def initialize(organization) @organization = organization end |
Instance Method Details
#query ⇒ Object
11 12 13 |
# File 'app/queries/decidim/conferences/organization_conferences.rb', line 11 def query Decidim::Conference.where(organization: @organization).order(weight: :asc, start_date: :desc) end |