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

Keep Preloader#preload API the same as before

The preload_scope argument were optional so we should keep it optional.
This commit is contained in:
Rafael Mendonça França 2021-01-05 18:36:44 +00:00
parent c28c800803
commit 9c423e0c85
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948

View file

@ -103,7 +103,7 @@ module ActiveRecord
build_preloaders
end
def preload(records, associations, preload_scope)
def preload(records, associations, preload_scope = nil)
ActiveSupport::Deprecation.warn("`preload` is deprecated and will be removed in Rails 7.0. Call `Preloader.new(kwargs).call` instead.")
Preloader.new(records: records, associations: associations, scope: preload_scope).call