aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/fixtures
diff options
context:
space:
mode:
authorHenrik Nygren <nygrenh@gmail.com>2015-05-14 09:42:55 +0300
committerHenrik Nygren <nygrenh@gmail.com>2015-05-14 10:46:44 +0300
commitbef9484cf867ab261891d3431782e60c4e17f87f (patch)
tree20d2436600193a9fcd756b564aeb0153c8425ecb /actionview/test/fixtures
parent987a45307f8ca0b8b6cbab3763180cbe4eee18b7 (diff)
downloadrails-bef9484cf867ab261891d3431782e60c4e17f87f.tar.gz
rails-bef9484cf867ab261891d3431782e60c4e17f87f.tar.bz2
rails-bef9484cf867ab261891d3431782e60c4e17f87f.zip
Do not put partial name to local_assigns when rendering without an object
When one rendered a partial template without specifying an object or a collection (e.g. <%= render partial: 'partial_name' %>), Rails would make an object called :partial_name available in local_assigns. I don't think this was the intended behavior, since no local variable called 'partial_name' gets defined in the view.
Diffstat (limited to 'actionview/test/fixtures')
-rw-r--r--actionview/test/fixtures/test/_partial_name_in_local_assigns.erb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionview/test/fixtures/test/_partial_name_in_local_assigns.erb b/actionview/test/fixtures/test/_partial_name_in_local_assigns.erb
new file mode 100644
index 0000000000..28ee9f41c5
--- /dev/null
+++ b/actionview/test/fixtures/test/_partial_name_in_local_assigns.erb
@@ -0,0 +1 @@
+<%= local_assigns.has_key?(:partial_name_in_local_assigns) %> \ No newline at end of file