Sha256: c4b06f2f48b0bf99c6e79a98381eb3a1fd9539794c7307ad65ae98501d81b99b
Contents?: true
Size: 648 Bytes
Versions: 15
Compression:
Stored size: 648 Bytes
Contents
# frozen_string_literal: true module Decidim module Proposals class HideAllCreatedByAuthorJob < ::Decidim::HideAllCreatedByAuthorJob protected def perform(resource:, extra: {}) return unless extra.fetch(:hide, false) Decidim::Proposals::Proposal.not_hidden.from_author(resource).find_each do |content| hide_content(content, extra[:event_author], extra[:justification]) end Decidim::Proposals::CollaborativeDraft.not_hidden.from_author(resource).find_each do |content| hide_content(content, extra[:event_author], extra[:justification]) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems