Porting Kompaqt to Rails from PHP