Merge pull request #86 from Kyuden/success_message_when_password_updated

Display success message when password updated successfully
This commit is contained in:
uu59 2014-10-03 13:23:35 +09:00
commit 7a5c49e5e3
4 changed files with 8 additions and 3 deletions

View File

@ -9,7 +9,7 @@ class UsersController < ApplicationController
return render :show
end
session[:password] = user_params[:password]
redirect_to user_path
redirect_to user_path, notice: I18n.t("messages.password_successfully_updated")
end
private

View File

@ -3,8 +3,11 @@
%div.col-xs-6
- @user.errors.full_messages.each do |e|
%div.alert.alert-danger= e
- if notice
%div.alert.alert-success= notice
- else
- @user.errors.full_messages.each do |e|
%div.alert.alert-danger= e
= form_for(:user, url: user_path, method: :patch) do |f|
%div.form-group

View File

@ -8,6 +8,7 @@ en:
fluentd_stop_failed: Failed to stop fluentd
fluentd_restart_failed: Failed to restart fluentd
fluentd_start_stop_delay_notice: "'%{action} daemon' is accepted. That operation could take a minute for complete."
password_successfully_updated: "Your password has been changed successfully."
terms: &terms
name: Name

View File

@ -8,6 +8,7 @@ ja:
fluentd_stop_failed: "%{brand}の停止に失敗しました。"
fluentd_restart_failed: "%{brand}の再起動に失敗しました。"
fluentd_start_stop_delay_notice: "デーモンの%{action}を受け付けました。処理が完了するまで時間がかかる場合があります。"
password_successfully_updated: "パスワードを変更しました。"
terms: &terms
name: アカウント名