Class: Decidim::HideAllCreatedByAuthorJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- Decidim::HideAllCreatedByAuthorJob
- Defined in:
- decidim-core/app/jobs/decidim/hide_all_created_by_author_job.rb
Direct Known Subclasses
Comments::HideAllCreatedByAuthorJob, Debates::HideAllCreatedByAuthorJob, Dev::HideAllCreatedByAuthorJob, Meetings::HideAllCreatedByAuthorJob, Proposals::HideAllCreatedByAuthorJob
Instance Method Summary collapse
Instance Method Details
#perform(resource:, extra: {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'decidim-core/app/jobs/decidim/hide_all_created_by_author_job.rb', line 7 def perform(resource:, extra: {}) return unless extra.fetch(:hide, false) @author = resource.reload base_query.find_each do |content| hide_content(content, extra[:event_author], extra[:justification]) end end |