philnash / pwned

😱 An easy, Ruby way to use the Pwned Passwords API.
https://rubygems.org/gems/pwned/
MIT License
426 stars 22 forks source link

Add double-splat to ActiveModel::Errors#add calls with options #15

Closed georgeclaghorn closed 4 years ago

georgeclaghorn commented 4 years ago

Shush warnings on Ruby 2.7:

.../gems/pwned-dd7754a624f5/lib/pwned/not_pwned_validator.rb:82: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
.../gems/rails-de853a296f56/activemodel/lib/active_model/errors.rb:373: warning: The called method `add' is defined here

ActiveModel::Errors#add only recently switched to kwargs, but this works with older Ruby and Rails.

philnash commented 4 years ago

Thanks @georgeclaghorn. I'll get this out as version 2.0.1.