• S
    Exists shouldn't error when used with `includes` · 02da8aea
    Sean Griffin 提交于
    Currently `exists?` does some hackery where it assumes that we can join
    onto anything that we passed to `eager_load` or `includes`, which
    doesn't work if we are joining onto a polymorphic association.
    
    Actually figuring out if we want to include something would require
    knowledge deep within the join dependency module, which is hard to pull
    up. The simplest solution is just to pass a flag down that says we're
    not actually going to try to eager load any of the data. It's not the
    solution I'd like, but that code really needs to be untangled before we
    can do much with it.
    
    This is another attempt at 6d5b1fdf which should address the concerns
    that led to reverting it in 4ecabed2.
    02da8aea
finder_methods.rb 21.2 KB