diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2016-10-15 10:53:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-15 10:53:43 -0400 |
commit | 28ce091f8239802a82c19743de039b2c1ec896d2 (patch) | |
tree | 7ddf3fce525d8cdd6f41bf110c5dc0c95a49d5da /actionpack/lib | |
parent | 10781f30a0401224477b3295ea16f816d522c71f (diff) | |
parent | 6fccd7b6293dcae383757379c5c3809c6674084e (diff) | |
download | rails-28ce091f8239802a82c19743de039b2c1ec896d2.tar.gz rails-28ce091f8239802a82c19743de039b2c1ec896d2.tar.bz2 rails-28ce091f8239802a82c19743de039b2c1ec896d2.zip |
Merge pull request #26786 from codeodor/patch-1
Allow any key in Renderer environment hash
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/renderer.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/renderer.rb b/actionpack/lib/action_controller/renderer.rb index 0739f16965..243a54330e 100644 --- a/actionpack/lib/action_controller/renderer.rb +++ b/actionpack/lib/action_controller/renderer.rb @@ -102,7 +102,9 @@ module ActionController method: ->(v) { v.upcase }, } - def rack_key_for(key); RACK_KEY_TRANSLATION[key]; end + def rack_key_for(key) + RACK_KEY_TRANSLATION.fetch(key, key.to_s) + end def rack_value_for(key, value) RACK_VALUE_TRANSLATION.fetch(key, IDENTITY).call value |