frozen_string_literal: true


frozen_string_literal: true


frozen_string_literal: true


frozen_string_literal: true

Show files where this class is defined (12 files)
Register or log in to add new notes.
October 3, 2009
0 thanks

sort_by

array.sort_by {|element| [element.foo, element.bar.name, element.baz]}

Taken from http://redcorundum.blogspot.com/2006/10/using-sortby-instead-of-sort.html