提交 e8d58bb2 编写于 作者: S Santiago Pastorino

Merge pull request #23743 from maclover7/rm-unused-parameter

Remove unused parameter from method
......@@ -327,7 +327,7 @@ def to_hash(full_messages = false)
# # => {:base=>[{error: :name_or_email_blank}]}
def add(attribute, message = :invalid, options = {})
message = message.call if message.respond_to?(:call)
detail = normalize_detail(attribute, message, options)
detail = normalize_detail(message, options)
message = normalize_message(attribute, message, options)
if exception = options[:strict]
exception = ActiveModel::StrictValidationFailed if exception == true
......@@ -502,7 +502,7 @@ def normalize_message(attribute, message, options)
end
end
def normalize_detail(attribute, message, options)
def normalize_detail(message, options)
{ error: message }.merge(options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS))
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册