Skip to content

Commit

Permalink
Fix undefined error for ActionController::Parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
maclover7 committed Jan 27, 2016
1 parent 6dfab47 commit 534b12a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions actionpack/lib/abstract_controller/rendering.rb
Expand Up @@ -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
Expand Down

0 comments on commit 534b12a

Please sign in to comment.