Skip to content
This repository
Browse code

hashes are ordered, so we do not need to sort

  • Loading branch information...
commit 1a193bdc632f99cae09b1657a74a5bc80c946ad6 1 parent 18a74f9
Aaron Patterson authored October 03, 2013
6  activerecord/lib/active_record/associations/join_dependency.rb
@@ -147,9 +147,9 @@ def build(associations, parent, join_type)
147 147
             build(association, parent, join_type)
148 148
           end
149 149
         when Hash
150  
-          associations.keys.sort_by { |a| a.to_s }.each do |name|
151  
-            join_association = build(name, parent, join_type)
152  
-            build(associations[name], join_association, join_type)
  150
+          associations.each do |left, right|
  151
+            join_association = build(left, parent, join_type)
  152
+            build(right, join_association, join_type)
153 153
           end
154 154
         else
155 155
           raise ConfigurationError, associations.inspect

0 notes on commit 1a193bd

Please sign in to comment.
Something went wrong with that request. Please try again.