We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b22bd9f commit 906bf9cCopy full SHA for 906bf9c
lib/i18n/backend/active_record/translation.rb
@@ -93,11 +93,11 @@ def lookup(keys, *separator)
93
end
94
95
def available_locales
96
- Translation.select('DISTINCT locale').to_a.map { |t| t.locale.to_sym }
+ select('DISTINCT locale').to_a.map { |t| t.locale.to_sym }
97
98
99
def to_h
100
- Translation.all.each.with_object({}) do |t, memo|
+ all.each.with_object({}) do |t, memo|
101
locale_hash = (memo[t.locale.to_sym] ||= {})
102
keys = t.key.split('.')
103
keys.each.with_index.inject(locale_hash) do |iterator, (key_part, index)|
0 commit comments