Skip to content
Snippets Groups Projects
Unverified Commit ea428c5a authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

overridable method

parent 1bf48ad9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment