Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Preloader to remove AlreadyLoaded class
Part 2 of ? It felt strange to have an `AlreadyLoaded` class when we have 2 classes for the preloaders. `ThroughAssociation` already super's to `Association`. Instead of having a new class that provides a confusing indirection, we can get and set all the information we need on `Association` inside of `run`. In addition, the `already_loaded` instance variable on `ThroughAssociation` actually meant something different than `already_loaded` that was checked for `AlreadyLoaded`. By pushing this check down we can get rid of the `initialize` in `ThroughAssociation` entirely since then all it's doing is calling `super`. Co-authored-by: John Crepezzi <john.crepezzi@gmail.com>
- Loading branch information
1 parent
0ecf163
commit 93f37d5
Showing
3 changed files
with
18 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters