update rails and json