Here’s a few nifty little methods I implemented for LayerVault to help me pull out the newest and “freshest” records from arrays.

I love Ruby.

http://gist.github.com/1380926.js?file=newest.rb

Drop these guys in config/initializers/array_methods.rb and away you go!

  1. kellysutton posted this