instance method
render_partial
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v3.0.20Signature
render_partial(object = @object)
No documentation comment.
Parameters
-
objectopt = @object
Source
# File actionpack/lib/action_view/render/partials.rb, line 327
def render_partial(object = @object)
locals, view, template, block = @locals, @view, @template, @block
object ||= locals[template.variable_name]
locals[@options[:as] || template.variable_name] = object
template.render(view, locals) do |*name|
view._layout_for(*name, &block)
end
end
Defined in actionpack/lib/action_view/render/partials.rb line 327
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Partials::PartialRenderer