提交 534b12af 编写于 作者: J Jon Moss

Fix undefined error for `ActionController::Parameters`

上级 6dfab475
......@@ -82,13 +82,10 @@ def view_assigns
# <tt>render :file => "foo/bar"</tt>.
# :api: plugin
def _normalize_args(action=nil, options={})
case action
when ActionController::Parameters
unless action.permitted?
raise ArgumentError, "render parameters are not permitted"
end
if action.respond_to?(:permitted?) && action.permitted?
raise ArgumentError, "render parameters are not permitted"
action
when Hash
elsif action.is_a?(Hash)
action
else
options
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册