mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Avoid creating unneeded Hash instance and calling slow Hash#fetch
This commit is contained in:
parent
314f320c78
commit
9461583d3f
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ module ActionView
|
|||
|
||||
# Determine the template to be rendered using the given options.
|
||||
def determine_template(options)
|
||||
keys = options.fetch(:locals, {}).keys
|
||||
keys = options.has_key?(:locals) ? options[:locals].keys : []
|
||||
|
||||
if options.key?(:body)
|
||||
Template::Text.new(options[:body])
|
||||
|
|
Loading…
Reference in a new issue