Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/upgrade 0.27.4 and decidim awesome #398

Merged
merged 11 commits into from
Sep 25, 2023
Prev Previous commit
Next Next commit
Fix participatory_processes override
Kagemaru committed Sep 18, 2023
commit 193b7206ee8e9b34aae61f14b6a3f0dabba1bbe0
Original file line number Diff line number Diff line change
@@ -2,20 +2,22 @@

# Override last checked at: 31.07.2023
Decidim::ParticipatoryProcesses::ParticipatoryProcessesController.class_eval do
helper_method :has_landing_page
helper_method :participatory_process_groups,
:filtered_processes,
:participatory_processes,
:has_landing_page

private

def collection
# Don't include process groups in this list
@collection ||= paginate(Kaminari.paginate_array(participatory_processes))
@collection ||= participatory_processes
end

def has_landing_page(process_group)
Decidim::ContentBlock
.published
.for_scope(:participatory_process_group_homepage, organization: current_organization)
.where(scoped_resource_id: process_group.id)
.exists?
.exists?(scoped_resource_id: process_group.id)
end
end