CRUD operations with angular js and rails 4.1.1