We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f288405 commit 777bc9cCopy full SHA for 777bc9c
app/controllers/custom_message_settings_controller.rb
@@ -23,10 +23,8 @@ def update
23
if @setting.update_custom_messages(messages)
24
flash[:notice] = l(:notice_successful_update)
25
new_custom_messages = @setting.custom_messages
26
- if new_custom_messages.present?
27
- languages += new_custom_messages.keys.map(&:to_s)
28
- CustomMessageSetting.reload_translations!(languages)
29
- end
+ languages += new_custom_messages.keys.map(&:to_s) if new_custom_messages.try(:keys)
+ CustomMessageSetting.reload_translations!(languages)
30
redirect_to edit_custom_message_settings_path(tab: params[:tab])
31
else
32
@lang ||= User.current.language
0 commit comments