Skip to content

Commit

Permalink
Remove usage of Array#intersection to support Ruby 2.6 and below
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Oct 16, 2023
1 parent 4f83ad7 commit 01c4c64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG

### Unreleased - [View Diff](https://github.com/westonganger/rails_i18n_manager/compare/v1.0.0...master)
- [#13](https://github.com/westonganger/rails_i18n_manager/pull/13) - Remove usage of Array#intersection to fix errors in Ruby 2.6 and below
- [#11](https://github.com/westonganger/rails_i18n_manager/pull/11) - Fix google translate and add specs
- [#10](https://github.com/westonganger/rails_i18n_manager/pull/10) - Add missing pagination links to index pages

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def translate_missing
locales = (app_locales || key_record.translation_app.additional_locales_array)

### Filter to just google translate supported languages
locales = locales.intersection(GoogleTranslate::SUPPORTED_LOCALES)
locales = (locales & GoogleTranslate::SUPPORTED_LOCALES) # intersection

default_translation_text = key_record.default_translation

Expand Down

0 comments on commit 01c4c64

Please sign in to comment.