instance method
build_bound_template
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
build_bound_template(locals)
No documentation comment.
Parameters
-
localsreq
Source
# File actionview/lib/action_view/unbound_template.rb, line 69
def build_bound_template(locals)
@write_lock.synchronize do
return @strict_locals_template if @strict_locals_template
normalized_locals = normalize_locals(locals)
# We need ||=, both to dedup on the normalized locals and to check
# while holding the lock.
template = (@templates[normalized_locals] ||= build_template(normalized_locals))
if template.strict_locals?
@strict_locals_template = template
@templates = { normalized_locals => template }.freeze
else
# This may have already been assigned, but we've already de-dup'd so
# reassignment is fine.
@templates[locals.dup] = template
end
template
end
end
Defined in actionview/lib/action_view/unbound_template.rb line 69
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::UnboundTemplate