diff options
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/deprecated_error_methods.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/deprecated_error_methods.rb b/activemodel/lib/active_model/deprecated_error_methods.rb index 2f2e804ade..433de8931a 100644 --- a/activemodel/lib/active_model/deprecated_error_methods.rb +++ b/activemodel/lib/active_model/deprecated_error_methods.rb @@ -11,22 +11,22 @@ module ActiveModel end def on_base - # ActiveSupport::Deprecation.warn "Errors#on_base have been deprecated, use Errors#[:base] instead" - on(:base) + ActiveSupport::Deprecation.warn "Errors#on_base have been deprecated, use Errors#[:base] instead" + ActiveSupport::Deprecation.silence { on(:base) } end def add_to_base(msg) - # ActiveSupport::Deprecation.warn "Errors#add_to_base(msg) has been deprecated, use Errors#[:base] << msg instead" + ActiveSupport::Deprecation.warn "Errors#add_to_base(msg) has been deprecated, use Errors#[:base] << msg instead" self[:base] << msg end def invalid?(attribute) - # ActiveSupport::Deprecation.warn "Errors#invalid?(attribute) has been deprecated, use Errors#[attribute].any? instead" + ActiveSupport::Deprecation.warn "Errors#invalid?(attribute) has been deprecated, use Errors#[attribute].any? instead" self[attribute].any? end def each_full - # ActiveSupport::Deprecation.warn "Errors#each_full has been deprecated, use Errors#to_a.each instead" + ActiveSupport::Deprecation.warn "Errors#each_full has been deprecated, use Errors#to_a.each instead" to_a.each { |error| yield error } end end |