Fix new rubocop warnings
This commit is contained in:
parent
5ece1572d0
commit
0e2a66e8de
24 changed files with 152 additions and 116 deletions
|
@ -1390,8 +1390,8 @@ module Api
|
|||
def amf_content(target, ref, data)
|
||||
a, b = 1.divmod(256)
|
||||
c = StringIO.new
|
||||
c.write 0.chr + 0.chr # version 0
|
||||
c.write 0.chr + 0.chr # n headers
|
||||
c.write 0.chr * 2 # version 0
|
||||
c.write 0.chr * 2 # n headers
|
||||
c.write a.chr + b.chr # n bodies
|
||||
c.write AMF.encodestring(target)
|
||||
c.write AMF.encodestring(ref)
|
||||
|
|
|
@ -63,13 +63,14 @@ class I18nTest < ActiveSupport::TestCase
|
|||
I18n.t(scope || ".", :locale => I18n.default_locale).map do |key, value|
|
||||
scoped_key = scope ? "#{scope}.#{key}" : key
|
||||
|
||||
if value.is_a?(Hash)
|
||||
case value
|
||||
when Hash
|
||||
if value.keys - plural_keys == []
|
||||
scoped_key
|
||||
else
|
||||
translation_keys(scoped_key)
|
||||
end
|
||||
elsif value.is_a?(String)
|
||||
when String
|
||||
scoped_key
|
||||
end
|
||||
end.flatten
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue