Rails API layer for TeachApp