rails/rails — pull request #12156 by rywall (2013-09-06 22:20:01+00:00)
Title: Allow Relation#from to accept other relations with bind values.

Support for Relation#from to accept another relation was added in 64872d1e34d929ee30041b37900591aade2a5eaf but an invalid query is generated if the relation being passed to Relation#from has bind values. This pull request copies the bind variables to the parent relation, similar to the fix for Relation#where provided in 170fb5c80c990688f5f372a3ba0e6cb75fb6edf0.