Sha256: d61feec1f51feda2b139af389423ea373f01e5323e81dd24fe357200ae6cd5f1

Contents?: true

Size: 740 Bytes

Versions: 58

Compression:

Stored size: 740 Bytes

Contents

# Log a fileset attachment to activity streams
class FileSetAttachedEventJob < ContentEventJob
  # Log the event to the fileset's and its container's streams
  def log_event(repo_object)
    repo_object.log_event(event)
    curation_concern.log_event(event)
  end

  def action
    "User #{link_to_profile depositor} has attached #{file_link} to #{work_link}"
  end

  private

    def file_link
      link_to file_title, polymorphic_path(repo_object)
    end

    def work_link
      link_to work_title, polymorphic_path(curation_concern)
    end

    def file_title
      repo_object.title.first
    end

    def work_title
      curation_concern.title.first
    end

    def curation_concern
      repo_object.in_works.first
    end
end

Version data entries

58 entries across 58 versions & 2 rubygems

Version Path
hyrax-2.9.6 app/jobs/file_set_attached_event_job.rb
hyrax-2.9.5 app/jobs/file_set_attached_event_job.rb
hyrax-2.9.4 app/jobs/file_set_attached_event_job.rb
hyrax-2.9.3 app/jobs/file_set_attached_event_job.rb
hyrax-2.9.2 app/jobs/file_set_attached_event_job.rb
hyrax-2.9.1 app/jobs/file_set_attached_event_job.rb
hyrax-2.9.0 app/jobs/file_set_attached_event_job.rb
hyrax-2.8.0 app/jobs/file_set_attached_event_job.rb
hyrax-2.7.2 app/jobs/file_set_attached_event_job.rb
hyrax-2.7.1 app/jobs/file_set_attached_event_job.rb
hyrax-2.7.0 app/jobs/file_set_attached_event_job.rb
hyrax-2.6.0 app/jobs/file_set_attached_event_job.rb
hyrax-3.0.0.pre.rc1 app/jobs/file_set_attached_event_job.rb
hyrax-3.0.0.pre.beta3 app/jobs/file_set_attached_event_job.rb
hyrax-2.5.1 app/jobs/file_set_attached_event_job.rb
hyrax-2.5.0 app/jobs/file_set_attached_event_job.rb
hyrax-3.0.0.pre.beta2 app/jobs/file_set_attached_event_job.rb
hyrax-2.4.1 app/jobs/file_set_attached_event_job.rb
hyrax-3.0.0.pre.beta1 app/jobs/file_set_attached_event_job.rb
hyrax-2.4.0 app/jobs/file_set_attached_event_job.rb