• S
    Unify access to bind values on Relation · 16ce2eec
    Sean Griffin 提交于
    The bind values can come from four places. `having`, `where`, `joins`,
    and `from` when selecting from a subquery that contains binds. These
    need to be kept in a specific order, since the clauses will always
    appear in that order. Up until recently, they were not.
    
    Additionally, `joins` actually did keep its bind values in a separate
    location (presumably because it's the only case that people noticed was
    broken). However, this meant that anything accessing just `bind_values`
    was broken (which most places were). This is no longer possible, there
    is only a single way to access the bind values, and it includes joins in
    the proper location. The setter was removed yesterday, so breaking `+=`
    cases is not possible.
    
    I'm still not happy that `joins` is putting it's bind values on the
    Arel AST, and I'm planning on refactoring it further, but this removes a
    ton of bug cases.
    16ce2eec
query_methods.rb 36.1 KB