Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveRecord::Associations::Preloader is private API #132

Closed
mtsmfm opened this issue Nov 16, 2020 · 1 comment
Closed

ActiveRecord::Associations::Preloader is private API #132

mtsmfm opened this issue Nov 16, 2020 · 1 comment

Comments

@mtsmfm
Copy link

mtsmfm commented Nov 16, 2020

As you can see, it's marked as :nodoc:

https://github.com/rails/rails/blob/4aa6559beb3be90b48b35a91708181fdd2975462/activerecord/lib/active_record/associations/preloader.rb#L45

I'm not sure how to achieve preloading by only public API though, it's better to avoid using that I think.

::ActiveRecord::Associations::Preloader.new.preload(records, @association_name)

@gmac
Copy link
Contributor

gmac commented May 22, 2024

There's a reason this is part of example code and not part of the core library. Use at your own discretion.

@gmac gmac closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants