Class: Decidim::Assemblies::OrganizationAssemblies

Inherits:
Rectify::Query
  • Object
show all
Defined in:
decidim-assemblies/app/queries/decidim/assemblies/organization_assemblies.rb

Overview

This query class filters all assemblies given an organization.

Instance Method Summary collapse

Constructor Details

#initialize(organization) ⇒ OrganizationAssemblies

Returns a new instance of OrganizationAssemblies.


7
8
9
# File 'decidim-assemblies/app/queries/decidim/assemblies/organization_assemblies.rb', line 7

def initialize(organization)
  @organization = organization
end

Instance Method Details

#queryObject


11
12
13
# File 'decidim-assemblies/app/queries/decidim/assemblies/organization_assemblies.rb', line 11

def query
  Decidim::Assembly.where(organization: @organization).order(weight: :asc)
end