Writing Rails-flavored AngularJS