Fix load_path example in README.md

`Dir[..]` returns an array, and `I18n.load_path` is already an array, so we should append the array elements rather than the whole thing.
This commit is contained in:
Nick Campbell 2022-11-10 10:56:21 +00:00 committed by GitHub
parent a544c8d10f
commit fc44cb5dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ gem 'i18n'
Then configure I18n with some translations, and a default locale:
```ruby
I18n.load_path << Dir[File.expand_path("config/locales") + "/*.yml"]
I18n.load_path += Dir[File.expand_path("config/locales") + "/*.yml"]
I18n.default_locale = :en # (note that `en` is already the default!)
```