Fix errors when rendering RSS feeds (#18531)
This commit is contained in:
parent
52f4e834f2
commit
0a1992430d
3 changed files with 11 additions and 1 deletions
|
@ -254,4 +254,8 @@ module LanguagesHelper
|
|||
def valid_locale?(locale)
|
||||
locale.present? && SUPPORTED_LOCALES.key?(locale.to_sym)
|
||||
end
|
||||
|
||||
def available_locale_or_nil(locale_name)
|
||||
locale_name.to_sym if locale_name.present? && I18n.available_locales.include?(locale_name.to_sym)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue