Class: Decidim::ActionDelegator::OrganizationSettings
- Inherits:
-
Query
- Object
- Query
- Decidim::ActionDelegator::OrganizationSettings
- Defined in:
- app/queries/decidim/action_delegator/organization_settings.rb
Instance Method Summary collapse
- #active ⇒ Object
-
#initialize(organization) ⇒ OrganizationSettings
constructor
A new instance of OrganizationSettings.
- #query ⇒ Object
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
#active ⇒ Object
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 |
#query ⇒ Object
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 |