Module: ChronoModel::Patches::Preloader::Association
- Defined in:
- lib/chrono_model/patches/preloader.rb
Instance Method Summary collapse
-
#build_scope ⇒ Object
Builds the preloader scope taking into account a potential
as_of_time
passed down the call chain starting at the end user invocation.
Instance Method Details
#build_scope ⇒ Object
Builds the preloader scope taking into account a potential as_of_time
passed down the call chain starting at the end user invocation.
69 70 71 72 73 74 75 76 77 |
# File 'lib/chrono_model/patches/preloader.rb', line 69 def build_scope scope = super if preload_scope.try(:as_of_time) scope = scope.as_of(preload_scope.as_of_time) end scope end |