diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2019-01-28 14:40:30 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2019-01-28 14:40:30 -0800 |
commit | 793455e594dc98ea026c7665dd0de3ae8829cf73 (patch) | |
tree | 119fe20352b0f86932dfcaae1d80389cad2c4570 | |
parent | e98b51300ab1c58b790cbaf9a27bd277184579ac (diff) | |
download | rails-793455e594dc98ea026c7665dd0de3ae8829cf73.tar.gz rails-793455e594dc98ea026c7665dd0de3ae8829cf73.tar.bz2 rails-793455e594dc98ea026c7665dd0de3ae8829cf73.zip |
Remove default parameters from method signature
This method is private, and we always pass something in.
-rw-r--r-- | actionview/lib/action_view/renderer/template_renderer.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 6a50ccff7f..c36baeffcd 100644 --- a/actionview/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb @@ -12,7 +12,7 @@ module ActionView @lookup_context.rendered_format ||= (template.formats.first || formats.first) - render_template(context, template, options[:layout], options[:locals]) + render_template(context, template, options[:layout], options[:locals] || {}) end private @@ -45,9 +45,7 @@ module ActionView # Renders the given template. A string representing the layout can be # supplied as well. - def render_template(view, template, layout_name = nil, locals = nil) - locals ||= {} - + def render_template(view, template, layout_name, locals) render_with_layout(view, layout_name, locals) do |layout| instrument(:template, identifier: template.identifier, layout: layout.try(:virtual_path)) do template.render(view, locals) { |*name| view._layout_for(*name) } |