Skip to content

Commit

Permalink
🤖 make Rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
timfjord committed Dec 16, 2024
1 parent 7f8f06b commit ef51e27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/i18n/backend/active_record/translation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ def lookup(keys, *separator)
end

def available_locales
self.select('DISTINCT locale').to_a.map { |t| t.locale.to_sym }
select('DISTINCT locale').to_a.map { |t| t.locale.to_sym }
end

def to_h
self.all.each.with_object({}) do |t, memo|
all.each.with_object({}) do |t, memo|
locale_hash = (memo[t.locale.to_sym] ||= {})
keys = t.key.split('.')
keys.each.with_index.inject(locale_hash) do |iterator, (key_part, index)|
Expand Down

0 comments on commit ef51e27

Please sign in to comment.