Add Rails API to sync with AngularJS