1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Errors#add takes keyword arguments

This commit is contained in:
Akira Matsuda 2019-09-09 02:01:00 +09:00
parent 31f54a2f7f
commit cf43b71b64

View file

@ -35,7 +35,7 @@ module ActiveRecord
error_options = options.except(:case_sensitive, :scope, :conditions) error_options = options.except(:case_sensitive, :scope, :conditions)
error_options[:value] = value error_options[:value] = value
record.errors.add(attribute, :taken, error_options) record.errors.add(attribute, :taken, **error_options)
end end
end end