From cf43b71b64e21182c34e0907167e13fc917436bd Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 9 Sep 2019 02:01:00 +0900 Subject: [PATCH] Errors#add takes keyword arguments --- activerecord/lib/active_record/validations/uniqueness.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index 2c3a2fb797..6a92fa32ee 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -35,7 +35,7 @@ module ActiveRecord error_options = options.except(:case_sensitive, :scope, :conditions) error_options[:value] = value - record.errors.add(attribute, :taken, error_options) + record.errors.add(attribute, :taken, **error_options) end end