Q:

returning objects in alphabetical order in ruby

[p1, p2, p3, p4].sort_by { |p| [p.fname, p.lname] }
0

New to Communities?

Join the community