Add paranoid behavior to translations of paranoid models

We want to be able to fetch soft deleted translations without using
with_deleted scope.
This commit is contained in:
Senén Rodero Rodríguez
2019-01-22 12:38:56 +01:00
committed by voodoorai2000
parent 2e8e7b83a5
commit 1de23fc726

View File

@@ -16,6 +16,10 @@ module Globalizable
def description def description
self.read_attribute(:description).try :html_safe self.read_attribute(:description).try :html_safe
end end
if self.paranoid?
translation_class.send :acts_as_paranoid, column: :hidden_at
end
end end
class_methods do class_methods do