Class: Decidim::Conferences::OrganizationPrioritizedConferences

Inherits:
Rectify::Query
  • Object
show all
Defined in:
decidim-conferences/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

Constructor Details

#initialize(organization, user = nil) ⇒ OrganizationPrioritizedConferences

Returns a new instance of OrganizationPrioritizedConferences.


8
9
10
11
# File 'decidim-conferences/app/queries/decidim/conferences/organization_prioritized_conferences.rb', line 8

def initialize(organization, user = nil)
  @organization = organization
  @user = user
end

Instance Method Details

#queryObject


13
14
15
16
17
18
# File 'decidim-conferences/app/queries/decidim/conferences/organization_prioritized_conferences.rb', line 13

def query
  Rectify::Query.merge(
    OrganizationPublishedConferences.new(@organization, @user),
    PrioritizedConferences.new
  ).query
end