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

translate posts with categories

parent b434770e
No related branches found
No related tags found
No related merge requests found
......@@ -178,6 +178,10 @@ class Communication::Website::Post < ApplicationRecord
end
def translate_additional_data!(translation)
# TODO: Must handle categories
categories.each do |category|
translated_category = category.translation_for(translation.language)
translated_category ||= category.translate!(translation.language)
translation.categories << translated_category
end
end
end
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