1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Registration#matches? takes keyword arguments

This commit is contained in:
Akira Matsuda 2019-09-07 11:51:20 +09:00
parent 1a40a48113
commit 47feea57a3

View file

@ -15,9 +15,9 @@ module ActiveRecord
Registration
end
def find_registration(symbol, *args)
def find_registration(symbol, *args, **kwargs)
registrations
.select { |registration| registration.matches?(symbol, *args) }
.select { |registration| registration.matches?(symbol, *args, **kwargs) }
.max
end
end