diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-27 09:15:22 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-27 09:18:30 -0700 |
commit | 16ce2eecd3eb23034555bb37b29c12985243d908 (patch) | |
tree | bfced5ffbc70aef244ff5a57c0d060028b9e7f4f /activerecord/lib/active_record/connection_adapters | |
parent | ad20b41cb941ac4271b58e083edba57cc6233b82 (diff) | |
download | rails-16ce2eecd3eb23034555bb37b29c12985243d908.tar.gz rails-16ce2eecd3eb23034555bb37b29c12985243d908.tar.bz2 rails-16ce2eecd3eb23034555bb37b29c12985243d908.zip |
Unify access to bind values on Relation
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.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
0 files changed, 0 insertions, 0 deletions