Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 39ba2da82b
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (27 sloc) 0.867 kb
module ActionView
module Renderable
# TODO: Local assigns should not be tied to template instance
attr_accessor :locals
# TODO: These readers should be private
attr_reader :filename, :source, :handler, :method_key, :method
def render
prepare!
@handler.render(self)
end
def method_name
['_run', @extension, method_name_path_segment].compact.join('_').to_sym
end
private
def prepare!
unless @prepared
@view.send(:evaluate_assigns)
@view.current_render_extension = @extension
if @handler.compilable?
@handler.compile_template(self) # compile the given template, if necessary
@method = @view.method_names[method_key] # Set the method name for this template and run it
end
@prepared = true
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.