Clasic Rails code from ymp