docbrown/app/jobs/comments/touch_user_job.rb
2019-05-01 13:59:50 -04:00

10 lines
241 B
Ruby

module Comments
class TouchUserJob < ApplicationJob
queue_as :comments_touch_user
def perform(comment_id)
comment = Comment.find_by(id: comment_id)
comment&.user&.touch(:updated_at, :last_comment_at)
end
end
end