Add flash
This commit is contained in:
parent
3b377978ea
commit
9e28dae0a8
3 changed files with 15 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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.'
|
||||||
|
|
|
@ -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: 'Публичный профиль успешно изменён.'
|
||||||
|
|
Reference in a new issue