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

Fix undefined error for `ActionController::Parameters`

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