instance method
_normalize_args
Ruby on Rails 4.1.16
Since v4.1.16 PrivateSignature
_normalize_args(action=nil, options={})
Normalize args by converting render “foo” to render :action => “foo” and render “foo/bar” to render :template => “foo/bar”. :api: private
Parameters
-
actionopt = nil -
optionsopt = {}
Source
# File actionview/lib/action_view/rendering.rb, line 112
def _normalize_args(action=nil, options={})
options = super(action, options)
case action
when NilClass
when Hash
options = action
when String, Symbol
action = action.to_s
key = action.include?(?/) ? :template : :action
options[key] = action
else
options[:partial] = action
end
options
end
Defined in actionview/lib/action_view/rendering.rb line 112
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Rendering