Skip to content
Browse files

revises a deprecation message

  • Loading branch information...
1 parent 3d0c928 commit c7106e827e34b34da8cb348e5ec387d87def24ec @fxn fxn committed Aug 29, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 activemodel/lib/active_model/errors.rb
View
4 activemodel/lib/active_model/errors.rb
@@ -283,8 +283,8 @@ def generate_message(attribute, type = :invalid, options = {})
if options[:default]
ActiveSupport::Deprecation.warn \
- "ActiveModel::Errors#generate_message(attributes, custom_message) has been deprecated.\n" +
- "Use ActiveModel::Errors#generate_message(attributes, :message => 'your message') instead."
+ "Giving :default as validation option to errors.add has been deprecated.\n" +
+ "Please use :message instead."
options[:message] = options.delete(:default)
end

0 comments on commit c7106e8

Please sign in to comment.
Something went wrong with that request. Please try again.