Ruby Tip

I learned something very interesting today:

if you want to do something like variable.method(|i|i.blah) and the said method is defiend to recieve a &block, you can write a short cut: variable.method(&:blah).


Hat tip to Moves on Rails.