aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2016-03-04 23:20:12 +0900
committerAkira Matsuda <ronnie@dio.jp>2016-03-04 23:20:12 +0900
commitc577657f6de64b743b12a21108dc9cc5cfc35098 (patch)
tree1e3d9987d34eb400349a848bf3a1ce8c94601f11 /actionview/test
parent25c7c4adc9d7568997423338069323abe0827385 (diff)
parent39c44480a23714252b023d024a315dc603f29437 (diff)
downloadrails-c577657f6de64b743b12a21108dc9cc5cfc35098.tar.gz
rails-c577657f6de64b743b12a21108dc9cc5cfc35098.tar.bz2
rails-c577657f6de64b743b12a21108dc9cc5cfc35098.zip
Merge pull request #24052 from bquorning/partial-rendering-with-collection-and-dot-in-partial-name
Fix partial rendering with dot in filename
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/fixtures/test/_customer.mobile.erb1
-rw-r--r--actionview/test/template/render_test.rb5
2 files changed, 6 insertions, 0 deletions
diff --git a/actionview/test/fixtures/test/_customer.mobile.erb b/actionview/test/fixtures/test/_customer.mobile.erb
new file mode 100644
index 0000000000..d8220afeda
--- /dev/null
+++ b/actionview/test/fixtures/test/_customer.mobile.erb
@@ -0,0 +1 @@
+Hello: <%= customer.name rescue "Anonymous" %> \ No newline at end of file
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb
index 3561114d90..b417d1ebfa 100644
--- a/actionview/test/template/render_test.rb
+++ b/actionview/test/template/render_test.rb
@@ -270,6 +270,11 @@ module RenderTestCases
assert_equal "Hello: davidHello: mary", @view.render(:partial => "test/customer", :collection => [ Customer.new("david"), Customer.new("mary") ])
end
+ def test_render_partial_collection_with_partial_name_containing_dot
+ assert_equal "Hello: davidHello: mary",
+ @view.render(:partial => "test/customer.mobile", :collection => [ Customer.new("david"), Customer.new("mary") ])
+ end
+
def test_render_partial_collection_as_by_string
assert_equal "david david davidmary mary mary",
@view.render(:partial => "test/customer_with_var", :collection => [ Customer.new("david"), Customer.new("mary") ], :as => 'customer')