aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2016-02-21 21:45:22 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2016-02-21 21:45:22 -0300
commite8d58bb29968f96661f2047f85416cd70748bf84 (patch)
tree493d90fe927bfc7ce8bf2e0bfbbfd4b93c250538 /activemodel/lib/active_model
parenta6e5e543f831aab3f67d38c27587e81833965f4c (diff)
parent67ba041a324f705dca93ce231aa8f4444385d896 (diff)
downloadrails-e8d58bb29968f96661f2047f85416cd70748bf84.tar.gz
rails-e8d58bb29968f96661f2047f85416cd70748bf84.tar.bz2
rails-e8d58bb29968f96661f2047f85416cd70748bf84.zip
Merge pull request #23743 from maclover7/rm-unused-parameter
Remove unused parameter from method
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/errors.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index ea69e7549e..36834bbd36 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -327,7 +327,7 @@ module ActiveModel
# # => {: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 @@ module ActiveModel
end
end
- def normalize_detail(attribute, message, options)
+ def normalize_detail(message, options)
{ error: message }.merge(options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS))
end
end