Skip to content

Monthly Archives: April 2006

Hash goodness! (or nice methods for working with hashes in Ruby & Rails)

13-Apr-06

I wish these methods were in ruby proper (or even just Rails).
I’ve been using at Zaadz. them to clear certain parameters out of parameter hashes in Rails, and I got tired of typing `something.delete_if { |k,v| %w{this that}.include?(k) }`… so I wrote a couple of extensions to Hash that let you filter a hash, […]