Class: Activity::CollectionPublishedJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/activity/collection_published_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(collection_id) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'app/jobs/activity/collection_published_job.rb', line 5

def perform(collection_id)
  collection = Collection.find(collection_id)
  Comment.create!(
    system: true,
    commentable: collection.creator || collection,
    commenter: model.creator,
    comment: I18n.t("jobs.activity.collection_published.comment", # rubocop:disable I18n/RailsI18n/DecorateStringFormattingUsingInterpolation
      name: collection.name,
      url: collection.federails_actor.profile_url)
  )
end