Skip to content

Commit e8d58bb

Browse files
committed
Merge pull request rails#23743 from maclover7/rm-unused-parameter
Remove unused parameter from method
2 parents a6e5e54 + 67ba041 commit e8d58bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activemodel/lib/active_model/errors.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def to_hash(full_messages = false)
327327
# # => {:base=>[{error: :name_or_email_blank}]}
328328
def add(attribute, message = :invalid, options = {})
329329
message = message.call if message.respond_to?(:call)
330-
detail = normalize_detail(attribute, message, options)
330+
detail = normalize_detail(message, options)
331331
message = normalize_message(attribute, message, options)
332332
if exception = options[:strict]
333333
exception = ActiveModel::StrictValidationFailed if exception == true
@@ -502,7 +502,7 @@ def normalize_message(attribute, message, options)
502502
end
503503
end
504504

505-
def normalize_detail(attribute, message, options)
505+
def normalize_detail(message, options)
506506
{ error: message }.merge(options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS))
507507
end
508508
end

0 commit comments

Comments
 (0)