made the rails api