Skip to content

Commit

Permalink
Fix load_path example in README.md
Browse files Browse the repository at this point in the history
`Dir[..]` returns an array, and `I18n.load_path` is already an array, so we should append the array elements rather than the whole thing.
  • Loading branch information
nickcampbell18 committed Nov 10, 2022
1 parent a544c8d commit fc44cb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!)
```

Expand Down

0 comments on commit fc44cb5

Please sign in to comment.