diff options
Diffstat (limited to 'app/models/node_action.rb')
| -rw-r--r-- | app/models/node_action.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/node_action.rb b/app/models/node_action.rb index aab1d238..a7036833 100644 --- a/app/models/node_action.rb +++ b/app/models/node_action.rb | |||
| @@ -200,6 +200,12 @@ class NodeAction < ApplicationRecord | |||
| 200 | old_url, new_url = old_page.external_url, new_page.external_url | 200 | old_url, new_url = old_page.external_url, new_page.external_url |
| 201 | diff[:external_url] = { "from" => old_url, "to" => new_url } if old_url != new_url | 201 | diff[:external_url] = { "from" => old_url, "to" => new_url } if old_url != new_url |
| 202 | 202 | ||
| 203 | old_redirect, new_redirect = old_page.redirect, new_page.redirect | ||
| 204 | diff[:redirect] = { "from" => old_redirect, "to" => new_redirect } if old_redirect != new_redirect | ||
| 205 | |||
| 206 | old_target, new_target = old_page.redirect_node&.unique_name, new_page.redirect_node&.unique_name | ||
| 207 | diff[:redirect_target] = { "from" => old_target, "to" => new_target } if old_target != new_target | ||
| 208 | |||
| 203 | old_tags, new_tags = old_page.tag_list.sort, new_page.tag_list.sort | 209 | old_tags, new_tags = old_page.tag_list.sort, new_page.tag_list.sort |
| 204 | diff[:tags] = { "from" => old_tags, "to" => new_tags } if old_tags != new_tags | 210 | diff[:tags] = { "from" => old_tags, "to" => new_tags } if old_tags != new_tags |
| 205 | 211 | ||
