adds error messages to account edit

This commit is contained in:
rgarcia
2015-08-07 17:47:53 +02:00
parent 076448ec80
commit a65396886a
2 changed files with 17 additions and 2 deletions

View File

@@ -7,8 +7,11 @@ class AccountController < ApplicationController
end
def update
flash[:notice] = t("flash.actions.save_changes.notice") if @account.update(account_params)
redirect_to account_path
if @account.update(account_params)
redirect_to account_path, notice: t("flash.actions.save_changes.notice")
else
render :show
end
end
private