Class: Decidim::HideAllCreatedByAuthorJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
decidim-core/app/jobs/decidim/hide_all_created_by_author_job.rb

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