a port of some ancient Rails code to modern rails just to make the wife happy