def lookup(locale, key, scope = [], options = {})
key = (Array(scope || []) + [key]).compact.join('.')
I18n::Coverage::KeyLogger.store_key(key)
super
end
This coverts a key like unauthenticated into devise.failure.unauthenticated, resulting in failures in otherwise perfectly functioning code.
I assume this was just an oversight, and you didn't realize super would pass through the altered key rather than the original argument. Proof of concept demo.
irb(main):001:1* class Parent
irb(main):002:2* def foo(key)
irb(main):003:2* puts "key is #{key}"
irb(main):004:1* end
irb(main):005:0> end
=> :foo
irb(main):006:1* class Child < Parent
irb(main):007:2* def foo(key)
irb(main):008:2* key = "banana"
irb(main):009:2* super
irb(main):010:1* end
irb(main):011:0> end
=> :foo
irb(main):012:0> Child.new.foo("ohai")
key is banana
key_logger.rb has this:
This coverts a key like
unauthenticated
intodevise.failure.unauthenticated
, resulting in failures in otherwise perfectly functioning code.I assume this was just an oversight, and you didn't realize
super
would pass through the altered key rather than the original argument. Proof of concept demo.