update rails and JSON