The Methodphitamine

, Aug 15, 2007

Jay Phillips:

I call it The Methodphitamine. That’s Method ph it amine, a drug for Ruby addicts to code faster.

This allows you to shorten

User.find(:all).map{|x|{|y| y.last_name.capitalize }}


User.find(:all).map &

Despite the stupid name, this is definitely a cool hack. I’m not entirely I’d ever actually use this, but I still find it great to find out the language supports stuff like this :-)