aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2019-03-29 21:38:48 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2019-03-29 21:38:48 +0530
commitd8ba2f7c5670f5b2ef1486c9a3fb3e69fc514989 (patch)
tree02bd1ab405328491caa6248e343ecb30d2e00050 /activemodel/lib
parent839b8d42cae1c900aa5029ddd0399415cf1b32da (diff)
downloadrails-d8ba2f7c5670f5b2ef1486c9a3fb3e69fc514989.tar.gz
rails-d8ba2f7c5670f5b2ef1486c9a3fb3e69fc514989.tar.bz2
rails-d8ba2f7c5670f5b2ef1486c9a3fb3e69fc514989.zip
Rename `i18n_full_message` config option to `i18n_customize_full_message`
- I feel `i18n_customize_full_messages` explains the meaning of the config better. - Followup of https://github.com/rails/rails/pull/32956
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/errors.rb6
-rw-r--r--activemodel/lib/active_model/railtie.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index d7e682d406..3a692a3e64 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -63,9 +63,9 @@ module ActiveModel
MESSAGE_OPTIONS = [:message]
class << self
- attr_accessor :i18n_full_message # :nodoc:
+ attr_accessor :i18n_customize_full_message # :nodoc:
end
- self.i18n_full_message = false
+ self.i18n_customize_full_message = false
attr_reader :messages, :details
@@ -413,7 +413,7 @@ module ActiveModel
return message if attribute == :base
attribute = attribute.to_s
- if self.class.i18n_full_message && @base.class.respond_to?(:i18n_scope)
+ if self.class.i18n_customize_full_message && @base.class.respond_to?(:i18n_scope)
attribute = attribute.remove(/\[\d\]/)
parts = attribute.split(".")
attribute_name = parts.pop
diff --git a/activemodel/lib/active_model/railtie.rb b/activemodel/lib/active_model/railtie.rb
index 0ed70bd473..eb7901c7e9 100644
--- a/activemodel/lib/active_model/railtie.rb
+++ b/activemodel/lib/active_model/railtie.rb
@@ -13,8 +13,8 @@ module ActiveModel
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
+ initializer "active_model.i18n_customize_full_message" do
+ ActiveModel::Errors.i18n_customize_full_message = config.active_model.delete(:i18n_customize_full_message) || false
end
end
end