提交 ae0c51ed 编写于 作者: J Justin Collins

Add test for "empty char-class" error

This error sometimes comes up when processsing a render
in a template, because the "name" of the template to render
is interpolated into a regex. If the "name" is actually a
method call or other code, then the regex comes out strange.
上级 10751a9c
......@@ -83,6 +83,11 @@ class HomeController < ApplicationController
redirect_to url_for(url)
end
def test_render_a_method_call
@user = User.find(params['user']).name
render :test_render
end
private
def filter_it
......
<h1>Home#test_render</h1>
<p>Find me in app/views/home/test_render.html.erb</p>
<%= render @user %>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册