Predictable Table Aliases in Joins


with our plugin, we are increasingly running into issues with the hard-
to-predict table alias assignment in ActiveRecord. The alias
assignment currently depends on the order of join associations to one
table. When using named_scopes with flexible joins, it is hard to
predict the table alias for conditions.

I would be happy to provide a patch for a more predictable association
table alias scheme and described an API in

Please have a look and let me know what you think about that approach.