このコミットが含まれているのは:
@@ -10,7 +10,7 @@ class PostCreatePlan
|
||||
|
||||
def build! locale
|
||||
direct_tag_specs, tag_sections = parse_direct_tag_specs(locale)
|
||||
default_tag_specs = build_default_tag_specs(direct_tag_specs)
|
||||
default_tag_specs = build_default_tag_specs(locale, direct_tag_specs)
|
||||
snapshot_tag_specs = merge_tag_specs(direct_tag_specs + default_tag_specs)
|
||||
preload_existing_tags_by_name!(snapshot_tag_specs.map { _1[:name] })
|
||||
validate_new_tag_specs!(snapshot_tag_specs)
|
||||
@@ -263,12 +263,11 @@ class PostCreatePlan
|
||||
end
|
||||
|
||||
def resolved_tag_name locale, name
|
||||
tag_name = TagName.find_by!(language_code: locale.language_code, name:)
|
||||
unless tag_name.primary_flg
|
||||
tag_name = TagName.find_by!(language_code: locale.language_code,
|
||||
tag_id: tag_name.tag_id,
|
||||
primary_flg: true)
|
||||
end
|
||||
tag_name.name
|
||||
tag_name = TagName.find_by(language_code: locale.language_code, name:)
|
||||
return name if !(tag_name) || tag_name.primary?
|
||||
|
||||
TagName.find_by!(language_code: locale.language_code,
|
||||
tag_id: tag_name.tag_id,
|
||||
primary_flg: true).name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -74,13 +74,13 @@ class PostCreator
|
||||
normalised_parent_post_ids: @attributes[:normalised_parent_post_ids] || [],
|
||||
video_ms: @attributes[:video_ms] }
|
||||
else
|
||||
build_materialised_plan
|
||||
build_materialised_plan(locale)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def build_materialised_plan
|
||||
plan = PostCreatePlan.new(attributes: @attributes).build!
|
||||
def build_materialised_plan locale
|
||||
plan = PostCreatePlan.new(attributes: @attributes).build!(locale)
|
||||
snapshot_tags = materialise_tags(plan[:snapshot_tag_specs] || [])
|
||||
post_tags = materialise_tags(plan[:post_tag_specs] || [])
|
||||
{
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする