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.
This is a tumblelog, kinda like a blog but with short-form, mixed-media posts with stuff I like. Scroll down a bit to start reading, or a bit more to read more about me.
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.