mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
use sort_by
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user