angularjs sample with angular-resource and rails backend.