diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-02-17 16:09:54 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-02-17 16:09:54 -0500 |
commit | 67ba041a324f705dca93ce231aa8f4444385d896 (patch) | |
tree | 5fe1d2921bb2db0f96ca4c30e19b8a0afbf58ea5 /activemodel | |
parent | 310e4418f4db899dcd07ff24f530ef8862c65f8b (diff) | |
download | rails-67ba041a324f705dca93ce231aa8f4444385d896.tar.gz rails-67ba041a324f705dca93ce231aa8f4444385d896.tar.bz2 rails-67ba041a324f705dca93ce231aa8f4444385d896.zip |
Remove unused parameter from method
The `attribute` parameter is not used inside the `normalize_detail`
method. This does not need to go through a deprecation cycle, since the
method is private.
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 4 |
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 |