このコミットが含まれているのは:
@@ -102,7 +102,7 @@ class Tag < ApplicationRecord
|
||||
tags = tag_names.map do |name|
|
||||
pf, cat = CATEGORY_PREFIXES.find { |p, _| name.downcase.start_with?(p) } || ['', nil]
|
||||
|
||||
name = TagName.canonicalise(name.sub(/\A#{ pf }/i, '')).first
|
||||
name = name.sub(/\A#{ pf }/i, '')
|
||||
|
||||
sections_by_tag = []
|
||||
while n = name.sub!(/^(\S*?)\[([0-9:.]*?)-([0-9:.]*?)\](\S*?)$/, '\1\4 \2 \3')
|
||||
@@ -116,9 +116,14 @@ class Tag < ApplicationRecord
|
||||
sections_by_tag << [begin_ms, end_ms]
|
||||
end
|
||||
|
||||
name = TagName.canonicalise(name).first
|
||||
|
||||
find_or_create_by_tag_name!(name, category: (cat || :general)).tap do |tag|
|
||||
tag.update!(category: cat) if cat && tag.category != cat
|
||||
sections[tag.id] = sections_by_tag if sections_by_tag.present?
|
||||
next if sections_by_tag.blank?
|
||||
|
||||
sections[tag.id] ||= []
|
||||
sections[tag.id].concat(sections_by_tag)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
新しい課題から参照
ユーザをブロックする