finished AngularJS to Rails