diff options
Diffstat (limited to 'lib/arel/relations')
-rw-r--r-- | lib/arel/relations/join.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/relations/join.rb b/lib/arel/relations/join.rb index fb51ea0260..d5ec9d43bd 100644 --- a/lib/arel/relations/join.rb +++ b/lib/arel/relations/join.rb @@ -37,6 +37,11 @@ module Arel end end + # TESTME: Not sure which scenario needs this method, was driven by failing tests in ActiveRecord + def column_for(attribute) + (relation1[attribute] || relation2[attribute]).column + end + def joins this_join = [ join_sql, |