app/controllers/users_controller.rb in fluentd-ui-0.2.0 vs app/controllers/users_controller.rb in fluentd-ui-0.3.0

- old
+ new

@@ -6,17 +6,17 @@ def update unless @user.update_attributes(user_params) return render :show end - session[:succeed_password] = user_params[:password] - redirect_to user_path + session[:password] = user_params[:password] + redirect_to user_path, notice: I18n.t("messages.password_successfully_updated") end private def find_user - @user = User.new(name: "admin") # user is only "admin" + @user = User.new(name: session[:user_name]) end def user_params params.require(:user).permit(:current_password, :password, :password_confirmation) end