Add flash messages
This commit is contained in:
parent
9a4c08237c
commit
3fd7f6ac7e
4 changed files with 10 additions and 2 deletions
|
@ -14,7 +14,7 @@ class Settings::AppearancesController < ApplicationController
|
||||||
|
|
||||||
return render :edit unless @account.update account_attributes_for_update
|
return render :edit unless @account.update account_attributes_for_update
|
||||||
|
|
||||||
redirect_to edit_settings_appearance_url
|
redirect_to edit_settings_appearance_url, notice: translate_flash
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Settings::ProfilesController < ApplicationController
|
||||||
|
|
||||||
return render :edit unless @account.update account_attributes_for_update
|
return render :edit unless @account.update account_attributes_for_update
|
||||||
|
|
||||||
redirect_to edit_settings_profile_url
|
redirect_to edit_settings_profile_url, notice: translate_flash
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
en:
|
en:
|
||||||
flash:
|
flash:
|
||||||
|
settings/appearances:
|
||||||
|
update: 'Appearance settings was successfully updated.'
|
||||||
settings/contacts:
|
settings/contacts:
|
||||||
destroy: 'Contact "%{value}" was successfully destroyed.'
|
destroy: 'Contact "%{value}" was successfully destroyed.'
|
||||||
|
settings/profiles:
|
||||||
|
update: 'Public profile was successfully updated.'
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
ru:
|
ru:
|
||||||
flash:
|
flash:
|
||||||
|
settings/appearances:
|
||||||
|
update: 'Настройки внешнего вида успешно изменены.'
|
||||||
settings/contacts:
|
settings/contacts:
|
||||||
destroy: 'Контакт "%{value}" успешно удалён.'
|
destroy: 'Контакт "%{value}" успешно удалён.'
|
||||||
|
settings/profiles:
|
||||||
|
update: 'Публичный профиль успешно изменён.'
|
||||||
|
|
Reference in a new issue