diff options
author | Iain Beeston <iain.beeston@gmail.com> | 2014-02-12 17:40:52 +0000 |
---|---|---|
committer | Iain Beeston <iain.beeston@gmail.com> | 2014-02-12 17:40:52 +0000 |
commit | 5b793a8add2d8fa57cde48ece3a9e20870a398f1 (patch) | |
tree | 10cd13d2b3546f9f3986d962fbf3b3fa289b4a8d /actionview/test/fixtures | |
parent | f34e0c4a207ddb7b2f25f43f68e0efad881cfbea (diff) | |
download | rails-5b793a8add2d8fa57cde48ece3a9e20870a398f1.tar.gz rails-5b793a8add2d8fa57cde48ece3a9e20870a398f1.tar.bz2 rails-5b793a8add2d8fa57cde48ece3a9e20870a398f1.zip |
Added tests to render helper that expect `render partial: @foo` to
automatically call @foo.to_partial_path
Calling `render @foo` allows local variables but not options to be
passed to the partial renderer. The correct way to render an object AND
pass options to the partial renderer is to pass the object in the
`:partial` parameter. However, there were previously no tests for this
behaviour (in `render_helper_test.rb` at least).
Diffstat (limited to 'actionview/test/fixtures')
-rw-r--r-- | actionview/test/fixtures/customers/_customer.xml.erb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionview/test/fixtures/customers/_customer.xml.erb b/actionview/test/fixtures/customers/_customer.xml.erb new file mode 100644 index 0000000000..d3f1e0768f --- /dev/null +++ b/actionview/test/fixtures/customers/_customer.xml.erb @@ -0,0 +1 @@ +<greeting><%= greeting %></greeting><name><%= customer.name %></name>
\ No newline at end of file |