1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

4 commits

Author SHA1 Message Date
Aaron Patterson
2f0bc1f789 only "normalize" once 2015-09-14 16:25:48 -07:00
Aaron Patterson
2db7304c2c create a new renderer instance on calls to for
This changes the renderer class to store the controller and defaults as
an instance variable rather than allocating a new class.  You can create
a new renderer with an new env by calling `Renderer#new` or use new
defaults by calling `Renderer#with_defaults` and saving the return value
somewhere.

Also I want to keep the `env` private since I would like to change the
keys in the future.  This commit only translates particular keys that
the user requested.
2015-09-14 15:58:12 -07:00
Kasper Timm Hansen
d3211d76ce Speed up normalize_keys by removing dup step.
Previously env was duplicated and then had it's keys mutated. This iterates through
the hash twice.
Using `transform_keys`, duplication and key mutation is a single iteration.

`convert_symbols` was renamed to `http_header_format`.
2015-01-22 17:35:19 +01:00
brainopia
801e399e42 Add ActionController::Renderer
Render arbitrary templates outside of controller actions
2015-01-22 01:02:11 +03:00