Class: Decidim::ParticipatorySpaceLastActivity
- Defined in:
- decidim-core/app/queries/decidim/participatory_space_last_activity.rb
Overview
This query finds the public ActionLog entries that can be shown in the activities views of the application within a Decidim participatory space.
Instance Attribute Summary collapse
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#participatory_space ⇒ Object
readonly
Returns the value of attribute participatory_space.
Instance Method Summary collapse
-
#initialize(participatory_space) ⇒ ParticipatorySpaceLastActivity
constructor
A new instance of ParticipatorySpaceLastActivity.
- #query ⇒ Object
Methods inherited from Query
#cached_query, #each, #eager?, #exists?, merge, #none?, #relation?, #|
Constructor Details
#initialize(participatory_space) ⇒ ParticipatorySpaceLastActivity
Returns a new instance of ParticipatorySpaceLastActivity.
9 10 11 12 |
# File 'decidim-core/app/queries/decidim/participatory_space_last_activity.rb', line 9 def initialize(participatory_space) @participatory_space = participatory_space @organization = participatory_space&.organization end |
Instance Attribute Details
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
7 8 9 |
# File 'decidim-core/app/queries/decidim/participatory_space_last_activity.rb', line 7 def organization @organization end |
#participatory_space ⇒ Object (readonly)
Returns the value of attribute participatory_space.
7 8 9 |
# File 'decidim-core/app/queries/decidim/participatory_space_last_activity.rb', line 7 def participatory_space @participatory_space end |
Instance Method Details
#query ⇒ Object
14 15 16 |
# File 'decidim-core/app/queries/decidim/participatory_space_last_activity.rb', line 14 def query LastActivity.new(organization).query.where(participatory_space:) end |