instance method
bind_locals
Ruby on Rails edge
Since v6.0.6.1Signature
bind_locals(locals)
No documentation comment.
Parameters
-
localsreq
Source
# File actionview/lib/action_view/unbound_template.rb, line 21
def bind_locals(locals)
if @strict_locals_template
@strict_locals_template
elsif frozen?
templates = ractor_local_templates
unless template = templates[locals]
normalized_locals = normalize_locals(locals)
template = templates.compute_if_absent(normalized_locals) { build_template(normalized_locals) }
templates[locals.dup] = template
end
template
else
@templates[locals] || build_bound_template(locals)
end
end
Defined in actionview/lib/action_view/unbound_template.rb line 21
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::UnboundTemplate