Class: Decidim::Assemblies::VisibleAssemblies

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

Overview

This query class filters assemblies given a current_user.

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ VisibleAssemblies

Returns a new instance of VisibleAssemblies.


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

def initialize(user)
  @user = user
end

Instance Method Details

#queryObject


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

def query
  Decidim::Assembly.visible_for(@user)
end