diff options
Diffstat (limited to 'activemodel/lib/active_model/railtie.rb')
-rw-r--r-- | activemodel/lib/active_model/railtie.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/railtie.rb b/activemodel/lib/active_model/railtie.rb index 1671eb7bd4..0ed70bd473 100644 --- a/activemodel/lib/active_model/railtie.rb +++ b/activemodel/lib/active_model/railtie.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "active_model" require "rails" @@ -5,8 +7,14 @@ module ActiveModel class Railtie < Rails::Railtie # :nodoc: config.eager_load_namespaces << ActiveModel + config.active_model = ActiveSupport::OrderedOptions.new + initializer "active_model.secure_password" do ActiveModel::SecurePassword.min_cost = Rails.env.test? end + + initializer "active_model.i18n_full_message" do + ActiveModel::Errors.i18n_full_message = config.active_model.delete(:i18n_full_message) || false + end end end |