diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-08 17:31:20 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-08 17:31:20 -0800 |
commit | 07b0e59988beb1b29bdfadd02f0d015eae9191cf (patch) | |
tree | 52a2610c93766da8e1bc78abb11c65b79c28824d /activerecord | |
parent | 7a237d56aa38c51987af0fd52d001989c4f3da07 (diff) | |
download | rails-07b0e59988beb1b29bdfadd02f0d015eae9191cf.tar.gz rails-07b0e59988beb1b29bdfadd02f0d015eae9191cf.tar.bz2 rails-07b0e59988beb1b29bdfadd02f0d015eae9191cf.zip |
use sort_by
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/class_methods/join_dependency.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency.rb index 13576e1aec..1856395f2d 100644 --- a/activerecord/lib/active_record/associations/class_methods/join_dependency.rb +++ b/activerecord/lib/active_record/associations/class_methods/join_dependency.rb @@ -151,7 +151,7 @@ module ActiveRecord build(association, parent, join_type) end when Hash - associations.keys.sort{|a,b|a.to_s<=>b.to_s}.each do |name| + associations.keys.sort_by { |a| a.to_s }.each do |name| join_association = build(name, parent, join_type) build(associations[name], join_association, join_type) end |