diff options
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index 4baecf24b4..166911f0fa 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -350,8 +350,9 @@ module ActiveModel ActiveSupport::Deprecation.warn(<<-MESSAGE.squish) ActiveModel::Errors#add_on_empty is deprecated and will be removed in Rails 5.1 - To achieve the same write - errors.add(attribute, :empty, options) if value.nil? || value.empty? + To achieve the same use: + + errors.add(attribute, :empty, options) if value.nil? || value.empty? MESSAGE Array(attributes).each do |attribute| @@ -371,8 +372,9 @@ module ActiveModel ActiveSupport::Deprecation.warn(<<-MESSAGE.squish) ActiveModel::Errors#add_on_blank is deprecated and will be removed in Rails 5.1 - To achieve the same write - errors.add(attribute, :empty, options) if value.blank? + To achieve the same use: + + errors.add(attribute, :empty, options) if value.blank? MESSAGE Array(attributes).each do |attribute| |