instance method
_normalize_args
Ruby on Rails 3.2.22.5
Since v3.0.20 PrivateSignature
_normalize_args(action=nil, options={})
Normalize args by converting render “foo” to render :action => “foo” and render “foo/bar” to render :app_template_file => “foo/bar”. :api: plugin
Parameters
-
actionopt = nil -
optionsopt = {}
Source
# File actionpack/lib/abstract_controller/rendering.rb, line 144
def _normalize_args(action=nil, options={})
case action
when NilClass
when Hash
options = action
when String, Symbol
action = action.to_s
key = action.include?(?/) ? :app_template_file : :action
options[key] = action
else
options[:partial] = action
end
options
end
Defined in actionpack/lib/abstract_controller/rendering.rb line 144
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AbstractController::Rendering