Skip to content
This repository
Browse code

Merge pull request #14016 from devlinzed/i18n_doc_fix

Documentation: Don't symbolize tainted data. [ci skip]
  • Loading branch information...
commit 4359bc6a7a6437899cca4ff7f719be8b29f0b6b3 2 parents b12c1b8 + ec0664a
Xavier Noria fxn authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 guides/source/i18n.md
6 guides/source/i18n.md
Source Rendered
@@ -145,7 +145,11 @@ The _setting part_ is easy. You can set the locale in a `before_action` in the `
145 145 before_action :set_locale
146 146
147 147 def set_locale
148   - I18n.locale = params[:locale] || I18n.default_locale
  148 + if %w[en fr].include?(params[:locale])
  149 + I18n.locale = params[:locale]
  150 + else
  151 + I18n.locale = I18n.default_locale
  152 + end
149 153 end
150 154 ```
151 155

0 comments on commit 4359bc6

Please sign in to comment.
Something went wrong with that request. Please try again.