diff --git a/app/models/communication/website/post.rb b/app/models/communication/website/post.rb index 8b72d41e7c18640ea6fade5107f9c3ff14ebfc58..83fb30bacfdff8b4ef82d483bebb268b8fcb9c5c 100644 --- a/app/models/communication/website/post.rb +++ b/app/models/communication/website/post.rb @@ -47,7 +47,7 @@ class Communication::Website::Post < ApplicationRecord include WithMenuItemTarget include WithPermalink include WithSlug # We override slug_unavailable? method - include WithTranslations # TODO: Must handle categories + include WithTranslations has_summernote :text @@ -176,4 +176,8 @@ class Communication::Website::Post < ApplicationRecord end author.update_and_sync(is_author: true) if author_id end + + def translate_additional_data!(translation) + # TODO: Must handle categories + end end diff --git a/app/models/concerns/with_translations.rb b/app/models/concerns/with_translations.rb index 37cd33af14e54d05ab5cf7c28053552b41fec2fd..bc62d97f5b5831527bdf9340ef04cd399907b65b 100644 --- a/app/models/concerns/with_translations.rb +++ b/app/models/concerns/with_translations.rb @@ -46,6 +46,7 @@ module WithTranslations translation.save # Handle blocks if object has any translate_blocks!(translation) if respond_to?(:blocks) + translate_additional_data!(translation) translation end @@ -67,4 +68,8 @@ module WithTranslations block_duplicate.save end end + + def translate_additional_data!(translation) + # Overridable method to handle custom cases + end end \ No newline at end of file