rails api saves item quantity