From ce152dc300c45e16637af0984df5cf3f533cd521 Mon Sep 17 00:00:00 2001 From: echarp Date: Fri, 18 Jul 2014 18:05:13 +0200 Subject: [PATCH] =?UTF-8?q?La=20gestion=20des=20translations=20dans=20la?= =?UTF-8?q?=20base=20de=20donn=C3=A9es=20ne=20bloque=20plus=20une=20migrat?= =?UTF-8?q?ion=20initiale=20du=20site?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/locale.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb index 07922e78..385a3696 100644 --- a/config/initializers/locale.rb +++ b/config/initializers/locale.rb @@ -1,3 +1,7 @@ require 'i18n/backend/active_record' -I18n.backend = I18n::Backend::Chain.new(I18n.backend, I18n::Backend::ActiveRecord.new) +Translation = I18n::Backend::ActiveRecord::Translation + +if Translation.table_exists? + I18n.backend = I18n::Backend::Chain.new(I18n.backend, I18n::Backend::ActiveRecord.new) +end