This commit is contained in:
@@ -136,6 +136,7 @@ class Tag < ApplicationRecord
|
||||
tn = tn.canonical if tn.canonical_id?
|
||||
|
||||
Tag.find_undiscard_or_create_by!(tag_name_id: tn.id) do |t|
|
||||
t.version_no = TagVersion.where(tag_id: t.id).order(version_no: :desc).first || 1
|
||||
t.category = category
|
||||
end
|
||||
rescue ActiveRecord::RecordNotUnique
|
||||
|
||||
Reference in New Issue
Block a user