1
0
Fork 0

Add flash

This commit is contained in:
Alex Kotov 2020-04-10 09:57:59 +05:00
parent 3b377978ea
commit 9e28dae0a8
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 15 additions and 1 deletions

View file

@ -11,7 +11,13 @@ class Settings::Contacts::SecurityNotificationSwitchesController \
@contact.send_security_notifications = !@contact.send_security_notifications @contact.send_security_notifications = !@contact.send_security_notifications
@contact.save! @contact.save!
redirect_to settings_contacts_url redirect_to(
settings_contacts_url,
notice: translate_flash(
@contact.send_security_notifications,
value: @contact.value,
),
)
end end
private private

View file

@ -8,5 +8,9 @@ en:
create: create:
true: 'Contact "%{value}" was made public.' true: 'Contact "%{value}" was made public.'
false: 'Contact "%{value}" was made private.' false: 'Contact "%{value}" was made private.'
settings/contacts/security_notification_switches:
create:
true: 'Contact "%{value}" was subscribed to security notifications.'
false: 'Contact "%{value}" was unsubscribed from security notifications.'
settings/profiles: settings/profiles:
update: 'Public profile was successfully updated.' update: 'Public profile was successfully updated.'

View file

@ -8,5 +8,9 @@ ru:
create: create:
true: 'Контакт "%{value}" сделан публичным.' true: 'Контакт "%{value}" сделан публичным.'
false: 'Контакт "%{value}" сделан приватным.' false: 'Контакт "%{value}" сделан приватным.'
settings/contacts/security_notification_switches:
create:
true: 'Контакт "%{value}" подписан на уведомления безопасности.'
false: 'Контакт "%{value}" отписан от уведомлений безопасности.'
settings/profiles: settings/profiles:
update: 'Публичный профиль успешно изменён.' update: 'Публичный профиль успешно изменён.'