Either, but not both, of template and file_path may be
nil. If file_path is given, the template will only be read if it
has to be compiled.
# File actionpack/lib/action_view/base.rb, line 255
def compile_and_render_template(extension, template = nil, file_path = nil, local_assigns = {})
# compile the given template, if necessary
if compile_template?(template, file_path, local_assigns)
template ||= read_template_file(file_path, extension)
compile_template(extension, template, file_path, local_assigns)
end
# Get the method name for this template and run it
method_name = @@method_names[file_path || template]
evaluate_assigns
local_assigns = local_assigns.symbolize_keys if @@local_assigns_support_string_keys
send(method_name, local_assigns) do |*name|
instance_variable_get "@content_for_#{name.first || 'layout'}"
end
end