clean up rails response