diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0123c94dd..df47576e1 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -267,7 +267,7 @@ class UsersController < ApplicationController handle_integrations_tab handle_response_templates_tab else - not_found unless @tab.in?(Constants::Settings::TAB_LIST.map { |t| t.downcase.tr(" ", "-") }) + not_found unless @tab.in?(Settings.tab_list.map { |t| t.downcase.tr(" ", "-") }) end end diff --git a/app/lib/constants/settings.rb b/app/lib/constants/settings.rb deleted file mode 100644 index 3e8dda9bf..000000000 --- a/app/lib/constants/settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -module Constants - module Settings - TAB_LIST = %w[ - Profile - Customization - Notifications - Account - Billing - Organization - Extensions - ].freeze - end -end diff --git a/app/lib/settings.rb b/app/lib/settings.rb new file mode 100644 index 000000000..39b6e273b --- /dev/null +++ b/app/lib/settings.rb @@ -0,0 +1,13 @@ +module Settings + def self.tab_list + [ + I18n.t("settings_menu.profile"), + I18n.t("settings_menu.customization"), + I18n.t("settings_menu.notifications"), + I18n.t("settings_menu.account"), + I18n.t("settings_menu.billing"), + I18n.t("settings_menu.organization"), + I18n.t("settings_menu.extensions"), + ] + end +end diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index b261e9181..17c67a4b2 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -44,7 +44,7 @@