Rails API for todos