Class: Decidim::ActionDelegator::OrganizationSettings

Inherits:
Query
  • Object
show all
Defined in:
app/queries/decidim/action_delegator/organization_settings.rb

Instance Method Summary collapse

Constructor Details

#initialize(organization) ⇒ OrganizationSettings

Returns a new instance of OrganizationSettings.



6
7
8
# File 'app/queries/decidim/action_delegator/organization_settings.rb', line 6

def initialize(organization)
  @organization = organization
end

Instance Method Details

#activeObject



16
17
18
19
20
# File 'app/queries/decidim/action_delegator/organization_settings.rb', line 16

def active
  Setting
    .joins(:consultation)
    .merge(organization_consultations.active)
end

#queryObject



10
11
12
13
14
# File 'app/queries/decidim/action_delegator/organization_settings.rb', line 10

def query
  Setting
    .joins(:consultation)
    .merge(organization_consultations)
end