fixed the splice issue in angular, and modified the order data is provided by rails in the rails controller