From badcaf676388561d322d45280db33ecbf3ca9caf Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 16 Sep 2020 11:51:07 +0900 Subject: [PATCH] AR::Base#read_attribute_for_validation is a public_method --- activemodel/lib/active_model/error.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemodel/lib/active_model/error.rb b/activemodel/lib/active_model/error.rb index ab983e2fcb..b6dbeb01f5 100644 --- a/activemodel/lib/active_model/error.rb +++ b/activemodel/lib/active_model/error.rb @@ -58,7 +58,7 @@ module ActiveModel def self.generate_message(attribute, type, base, options) # :nodoc: type = options.delete(:message) if options[:message].is_a?(Symbol) - value = (attribute != :base ? base.send(:read_attribute_for_validation, attribute) : nil) + value = (attribute != :base ? base.read_attribute_for_validation(attribute) : nil) options = { model: base.model_name.human,