Sha256: 551554e2f580ebdb1d0bf1c35612e6c640c4635704225d1bb8d7cf2b0923a50d

Contents?: true

Size: 618 Bytes

Versions: 25

Compression:

Stored size: 618 Bytes

Contents

# frozen_string_literal: true
# Log object deletion to activity streams
#
# @attr_reader deleted_work_id The id of the work that has been deleted by the user
class ContentDeleteEventJob < EventJob
  attr_reader :deleted_work_id

  def perform(deleted_work_id, depositor)
    @deleted_work_id = deleted_work_id
    super(depositor)
  end

  def action
    @action ||= "User #{link_to_profile depositor} has deleted object '#{deleted_work_id}'"
  end

  # override to log the event to the users profile stream instead of the user's stream
  def log_user_event(depositor)
    depositor.log_profile_event(event)
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/jobs/content_delete_event_job.rb
hyrax-5.0.0 app/jobs/content_delete_event_job.rb
hyrax-5.0.0.rc3 app/jobs/content_delete_event_job.rb
hyrax-5.0.0.rc2 app/jobs/content_delete_event_job.rb
hyrax-5.0.0.rc1 app/jobs/content_delete_event_job.rb
hyrax-3.6.0 app/jobs/content_delete_event_job.rb
hyrax-4.0.0 app/jobs/content_delete_event_job.rb
hyrax-4.0.0.rc3 app/jobs/content_delete_event_job.rb
hyrax-4.0.0.rc2 app/jobs/content_delete_event_job.rb
hyrax-4.0.0.rc1 app/jobs/content_delete_event_job.rb
hyrax-3.5.0 app/jobs/content_delete_event_job.rb
hyrax-4.0.0.beta2 app/jobs/content_delete_event_job.rb
hyrax-3.4.2 app/jobs/content_delete_event_job.rb
hyrax-4.0.0.beta1 app/jobs/content_delete_event_job.rb
hyrax-3.4.1 app/jobs/content_delete_event_job.rb
hyrax-3.4.0 app/jobs/content_delete_event_job.rb
hyrax-3.3.0 app/jobs/content_delete_event_job.rb
hyrax-3.2.0 app/jobs/content_delete_event_job.rb
hyrax-3.1.0 app/jobs/content_delete_event_job.rb
hyrax-3.0.2 app/jobs/content_delete_event_job.rb