File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -99,18 +99,25 @@ class Railtie < Rails::Railtie
99
99
100
100
config . after_initialize do
101
101
container = :"activerecord.attributes"
102
- I18n . t ( container , :default => { } ) . each do |key , value |
103
- if value . is_a? ( Hash ) && value . any? { |k , v | v . is_a? ( Hash ) }
104
- $stderr. puts "[DEPRECATION WARNING] Nested I18n namespace lookup under \" #{ container } .#{ key } \" is no longer supported"
102
+ lookup = I18n . t ( container , :default => { } )
103
+ if lookup . is_a? ( Hash )
104
+ lookup . each do |key , value |
105
+ if value . is_a? ( Hash ) && value . any? { |k , v | v . is_a? ( Hash ) }
106
+ $stderr. puts "[DEPRECATION WARNING] Nested I18n namespace lookup under \" #{ container } .#{ key } \" is no longer supported"
107
+ end
105
108
end
106
109
end
107
110
108
111
container = :"activerecord.models"
109
- I18n . t ( container , :default => { } ) . each do |key , value |
110
- if value . is_a? ( Hash )
111
- $stderr. puts "[DEPRECATION WARNING] Nested I18n namespace lookup under \" #{ container } .#{ key } \" is no longer supported"
112
+ lookup = I18n . t ( container , :default => { } )
113
+ if lookup . is_a? ( Hash )
114
+ lookup . each do |key , value |
115
+ if value . is_a? ( Hash )
116
+ $stderr. puts "[DEPRECATION WARNING] Nested I18n namespace lookup under \" #{ container } .#{ key } \" is no longer supported"
117
+ end
112
118
end
113
119
end
114
120
end
121
+
115
122
end
116
123
end
You can’t perform that action at this time.
0 commit comments