update rails and add flash msgs