mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
revises a deprecation message
This commit is contained in:
parent
a70675cd94
commit
a302a333f8
1 changed files with 2 additions and 2 deletions
|
@ -283,8 +283,8 @@ module ActiveModel
|
||||||
|
|
||||||
if options[:default]
|
if options[:default]
|
||||||
ActiveSupport::Deprecation.warn \
|
ActiveSupport::Deprecation.warn \
|
||||||
"ActiveModel::Errors#generate_message(attributes, custom_message) has been deprecated.\n" +
|
"Giving :default as validation option to errors.add has been deprecated.\n" +
|
||||||
"Use ActiveModel::Errors#generate_message(attributes, :message => 'your message') instead."
|
"Please use :message instead."
|
||||||
options[:message] = options.delete(:default)
|
options[:message] = options.delete(:default)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue