norman / friendly_id

FriendlyId is the “Swiss Army bulldozer” of slugging and permalink plugins for ActiveRecord. It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.
http://norman.github.io/friendly_id/
MIT License
6.14k stars 589 forks source link

Fix Ruby 2.7 keyword params deprecation warning #939

Closed mattbrictson closed 4 years ago

mattbrictson commented 4 years ago

This fixes the following warnings that are printed when using friendly_id with Ruby 2.7.1:

Using friendly_id @ master:

friendly_id-984dac788d10/lib/friendly_id/history.rb:75: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
rails-370188aea03f/activerecord/lib/active_record/associations.rb:1370: warning: The called method `has_many' is defined here

Using this PR, no warnings are printed.

mattbrictson commented 4 years ago

The mysql CI failures seem to be unrelated to this PR.

parndt commented 4 years ago

@mattbrictson I've merged in #940, could you please rebase this PR?

mattbrictson commented 4 years ago

Rebased ✔️

parndt commented 4 years ago

Thank you!