diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency/join_association.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index 68bdd41101..66cc5bd3ac 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -170,7 +170,7 @@ module ActiveRecord reflection.table_name, table_alias_for(reflection, parent, reflection != node.reflection) ) - }.reverse + } end def table_alias_for(reflection, parent, join) diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb index b47ee17aff..9677d1219a 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb @@ -27,7 +27,7 @@ module ActiveRecord def join_constraints(parent, tables, chain) joins = [] - tables = tables.dup + tables = tables.reverse foreign_table = parent.table foreign_klass = parent.base_klass @@ -113,7 +113,7 @@ module ActiveRecord end def table - tables.last + tables.first end def aliased_table_name |