rails/rails — pull request #14525 by vipulnsward (2014-03-29 04:44:54+00:00)
Title: Don't reverse scope_chain array on join constraints.

Don't reverse scope_chain array on join constraints, just use negative index to access elements.