Rails & AngularJs project using RESTful rails models, Angular factories and advanced custom directives