diff --git a/lib/i18n-js/engine.rb b/lib/i18n-js/engine.rb index 5d606ecd..8a728dba 100644 --- a/lib/i18n-js/engine.rb +++ b/lib/i18n-js/engine.rb @@ -35,7 +35,9 @@ class Engine < ::Rails::Engine # rewrite path cache hash at startup and before each request in development config.to_prepare do next unless SimplesIdeias::I18n.has_asset_pipeline? - SimplesIdeias::I18n::Engine.write_hash_if_changed unless Rails.env.production? + if Rails.env.development? || Rails.env.test? + SimplesIdeias::I18n::Engine.write_hash_if_changed + end end def self.load_path_hash_cache