diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2021-11-17 20:45:39 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2021-11-17 20:45:39 +0000 |
commit | 87097f2204f7bef10146da87162e2c1551d124d8 (patch) | |
tree | 73331c382bc1136a2bcb1db3a8764a38c4faf9d8 /config/initializers | |
parent | 838e719edfb2190c5ccc86accacef2ad57b39762 (diff) | |
download | redmine-87097f2204f7bef10146da87162e2c1551d124d8.tar.gz redmine-87097f2204f7bef10146da87162e2c1551d124d8.zip |
Move preparation code to redmine/preparation.rb (#29914, #32938).
Patch by Takashi Kato.
git-svn-id: http://svn.redmine.org/redmine/trunk@21284 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/10-patches.rb | 1 | ||||
-rw-r--r-- | config/initializers/30-redmine.rb | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index 5788091b5..850ab460a 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'active_record' +require 'redmine/i18n' module ActiveRecord class Base diff --git a/config/initializers/30-redmine.rb b/config/initializers/30-redmine.rb index d6240f25d..568bcb741 100644 --- a/config/initializers/30-redmine.rb +++ b/config/initializers/30-redmine.rb @@ -1,11 +1,16 @@ # frozen_string_literal: true +require 'redmine/i18n' +require 'redmine/configuration' +require 'redmine/plugin_loader' + I18n.backend = Redmine::I18n::Backend.new # Forces I18n to load available locales from the backend I18n.config.available_locales = nil -require 'redmine' -require 'redmine/plugin_loader' +Rails.application.config.to_prepare do + Redmine::Preparation.prepare +end # Load the secret token from the Redmine configuration file secret = Redmine::Configuration['secret_token'] |