aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman@gmail.com>2015-11-12 21:47:43 -0600
committerRichard Schneeman <richard.schneeman@gmail.com>2015-11-12 21:47:43 -0600
commitc7368fd86dfb7c26324f8fabe5cbde6d5b44ac5a (patch)
tree8791424d41845e5e0a2391a23414bac23da41896 /actionview/lib
parent0db310586ac3e15be95d2ef27ff40cfa24c05c10 (diff)
parent429bd260c1cca8af1aac0ec31b85e487dc14b123 (diff)
downloadrails-c7368fd86dfb7c26324f8fabe5cbde6d5b44ac5a.tar.gz
rails-c7368fd86dfb7c26324f8fabe5cbde6d5b44ac5a.tar.bz2
rails-c7368fd86dfb7c26324f8fabe5cbde6d5b44ac5a.zip
Merge pull request #22279 from yui-knk/fix_object_partial_false
Respect value of `:object` if `:object` is false when rendering
Diffstat (limited to 'actionview/lib')
-rw-r--r--actionview/lib/action_view/renderer/partial_renderer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb
index a78bf0a6e9..bdbf03191a 100644
--- a/actionview/lib/action_view/renderer/partial_renderer.rb
+++ b/actionview/lib/action_view/renderer/partial_renderer.rb
@@ -337,7 +337,7 @@ module ActionView
layout = find_template(layout.to_s, @template_keys)
end
- object ||= locals[as]
+ object = locals[as] if object.nil? # Respect object when object is false
locals[as] = object if @has_object
content = @template.render(view, locals) do |*name|