rails and json update