aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/cache_key_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2016-11-21 12:41:35 +0100
committerYves Senn <yves.senn@gmail.com>2016-11-21 12:41:35 +0100
commitfc4c15d823b112cc440cbd9a4288e1a389c138da (patch)
tree3c8a0a2ca024d959b132914e4e6871d27deb658a /activerecord/test/cases/cache_key_test.rb
parent6d6249b1c1abda4f62fafcc42a7ece570c8da7e9 (diff)
downloadrails-fc4c15d823b112cc440cbd9a4288e1a389c138da.tar.gz
rails-fc4c15d823b112cc440cbd9a4288e1a389c138da.tar.bz2
rails-fc4c15d823b112cc440cbd9a4288e1a389c138da.zip
`eager_autoload` needs to be triggered for nested constants.
When `ActiveRecord::Associations.eager_load!` is called, it eager loads the `Preloader` but does not trigger a `eager_load!` on the `Preloader` itself. A eager loaded component is responsible to forward the `eager_load!` call to nested constants that make use of `eager_autoload` as well. This will also resolve the occasional `NameError` that we've observed in production: ``` NameError: uninitialized constant ActiveRecord::Associations::Preloader::BelongsTo ```
Diffstat (limited to 'activerecord/test/cases/cache_key_test.rb')
0 files changed, 0 insertions, 0 deletions