Faking it: enums in Ruby

Ruby doesn’t have enums and in Rails I sometimes need it. I’ve come out with my own way of doing after some trial and error. First I want to be able to access these enums as constants in a class, like: Pizza::RAW Pizza::COOKED Pizza::BOXED Pizza::DELIVERED...

Metaprogramming Ruby

http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=pupeno-20&o=1&p=8&l=as1&m=amazon&f=ifr&md=10FE9736YVPPT7A0FBG2&asins=1934356476 There are thousands of books that...

360 vision

I’m surprised I’ve never seen this idea being tried… When I’ve was a kid I’ve read a report about an experiment. A guy put goggles with screens so that he could see nothing but the screens (ala virtual reality). The same device also had...

The magic of Bundler

Recently I reported a bug for Formtastic. Justin French, the author of Formtastic, created a branch and made a fix. He then asked me for my feedback. I look at the code and then decided to give it a try. In a pre-Bundler world that would have required this: Find a...