Working example of Rails API and AngularJS