-
John Hawthorn authored
Previously Action View was hooking in to _normalize_options to add :layout, :partial, and :prefix keys to the render options. These were added whether or not we were rendering a view template. This commit avoids adding those keys unless we are rendering a template. This improves performance both by avoiding calculating the templates to put into this options hash as well as enabling a fast path in `render json:`, which can only be used when `.to_json` is given no options.
John Hawthorn authoredPreviously Action View was hooking in to _normalize_options to add :layout, :partial, and :prefix keys to the render options. These were added whether or not we were rendering a view template. This commit avoids adding those keys unless we are rendering a template. This improves performance both by avoiding calculating the templates to put into this options hash as well as enabling a fast path in `render json:`, which can only be used when `.to_json` is given no options.
Loading