Integrate rails with front-end