Checking if a method called in transaction

•April 27, 2007 • Leave a Comment

Sometimes it’s comforting to know your method is called within a transaction.


if Thread.current['open_transactions'].nil? ||
Thread.current['open_transactions'] == 0

will do. Any better idea?

GVIM for RoR

•February 4, 2007 • Leave a Comment

I used TextMate at work. It’s as good as you can get, but it’s only for Mac OS which I don’t have at home. Today I tried rails.vim for gvim on my newly installed Ubuntu. Again, it proves that vim is a forever favorite. Mastering all key bindings with the rails script may take time, but I can smell it’s worth it.

Another IDE I tried was RadRails, for some reason, on my Ubuntu box, it was super slow and it sounds funny to have a RoR IDE written in Java anyway.