Skip to content

Commit

Permalink
revises a deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Aug 29, 2010
1 parent 3d0c928 commit c7106e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activemodel/lib/active_model/errors.rb
Expand Up @@ -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

Expand Down

0 comments on commit c7106e8

Please sign in to comment.