1
0
Fork 0

Add flash messages

This commit is contained in:
Alex Kotov 2019-09-04 04:17:48 +05:00
parent 9a4c08237c
commit 3fd7f6ac7e
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 10 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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.'

View file

@ -1,4 +1,8 @@
ru: ru:
flash: flash:
settings/appearances:
update: 'Настройки внешнего вида успешно изменены.'
settings/contacts: settings/contacts:
destroy: 'Контакт "%{value}" успешно удалён.' destroy: 'Контакт "%{value}" успешно удалён.'
settings/profiles:
update: 'Публичный профиль успешно изменён.'