ported to ruby 2 and the new versione of activeRecord
minor fix