mirror of https://github.com/rails/rails
Fix undefined error for `ActionController::Parameters`
This commit is contained in:
parent
6dfab475ca
commit
534b12afb5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue