|
|
|
@@ -131,7 +131,7 @@ class PostsController < ApplicationController |
|
|
|
ApplicationRecord.transaction do |
|
|
|
post.save! |
|
|
|
tags = Tag.normalise_tags(tag_names) |
|
|
|
record_tag_snapshots!(tags, created_by_user: current_user) |
|
|
|
TagVersioning.record_tag_snapshots!(tags, created_by_user: current_user) |
|
|
|
|
|
|
|
tags = Tag.expand_parent_tags(tags) |
|
|
|
sync_post_tags!(post, tags) |
|
|
|
@@ -175,10 +175,10 @@ class PostsController < ApplicationController |
|
|
|
ApplicationRecord.transaction do |
|
|
|
post.update!(title:, original_created_from:, original_created_before:) |
|
|
|
|
|
|
|
normalised_tag = Tag.normalise_tags(tag_names, with_tagme: false) |
|
|
|
record_tag_snapshots(normalised_tags, create_by_user: current_user) |
|
|
|
normalised_tags = Tag.normalise_tags(tag_names, with_tagme: false) |
|
|
|
TagVersioning.record_tag_snapshots!(normalised_tags, created_by_user: current_user) |
|
|
|
|
|
|
|
tags = post.tags.where(category: 'nico').to_a + normalised_tags |
|
|
|
tags = post.tags.nico.to_a + normalised_tags |
|
|
|
tags = Tag.expand_parent_tags(tags) |
|
|
|
sync_post_tags!(post, tags) |
|
|
|
PostVersionRecorder.record!(post:, event_type: :update, created_by_user: current_user) |
|
|
|
|