instance method
render
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
render(view, locals, buffer=nil, &block)
Render a template. If the template was not compiled yet, it is done exactly before rendering.
This method is instrumented as “!render_template.action_view”. Notice that we use a bang in this instrumentation because you don’t want to consume this in production. This is only slow if it’s being listened to.
Parameters
-
viewreq -
localsreq -
bufferopt = nil -
blockblock
Source
# File actionpack/lib/action_view/template.rb, line 142
def render(view, locals, buffer=nil, &block)
ActiveSupport::Notifications.instrument("!render_template.action_view", :virtual_path => @virtual_path) do
compile!(view)
view.send(method_name, locals, buffer, &block)
end
rescue Exception => e
handle_render_error(view, e)
end
Defined in actionpack/lib/action_view/template.rb line 142
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Template