Class: Activity::ModelUpdatedJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- Activity::ModelUpdatedJob
- Defined in:
- app/jobs/activity/model_updated_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(model_id) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/jobs/activity/model_updated_job.rb', line 5 def perform(model_id) model = Model.find(model_id) Comment.create!( system: true, commentable: model, commenter: model.creator || model, comment: I18n.t("jobs.activity.updated_model.comment", name: model.name, url: model.federails_actor.profile_url, creator_handle: model.creator.federails_actor.at_address, creator_name: model.creator.name), sensitive: model.sensitive ) end |