Fix undefined error for `ActionController::Parameters`

This commit is contained in:
Jon Moss 2016-01-25 15:21:11 -05:00
parent 6dfab475ca
commit 534b12afb5
1 changed files with 3 additions and 6 deletions

View File

@ -82,13 +82,10 @@ module AbstractController
# <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