You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
346 B
12 lines
346 B
class CreateDiffRecordJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform(user_id, obj_id, obj_klass, column_name, before, after)
|
|
user = User.find_by(id: user_id)
|
|
obj = obj_klass.constantize.find_by(id: obj_id)
|
|
|
|
return if user.blank? || obj.blank?
|
|
|
|
CreateDiffRecordService.call(user, obj, column_name, before, after)
|
|
end
|
|
end |