merge RoR code into WIP front-end code