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.
15 lines
408 B
15 lines
408 B
class ShixunInfo < ApplicationRecord
|
|
belongs_to :shixun
|
|
validates_uniqueness_of :shixun_id
|
|
validates_presence_of :shixun_id
|
|
|
|
after_commit :create_diff_record
|
|
|
|
private
|
|
|
|
def create_diff_record
|
|
return unless description_previously_changed?
|
|
CreateDiffRecordJob.perform_later(User.current.id, id, 'ShixunInfo', 'description', description_before_last_save, description)
|
|
end
|
|
end
|