method
render_partial
v2.1.0 -
Show latest stable
-
0 notes -
Class: ActionView::Partials
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.2 (0)
- 2.3.8 (0)
- 3.0.0
- 3.0.5
- 3.0.7
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.3
- 3.2.8
- 3.2.13
- What's this?
render_partial(partial_path, object_assigns = nil, local_assigns = {})
private
Hide source
# File actionpack/lib/action_view/partials.rb, line 106 def render_partial(partial_path, object_assigns = nil, local_assigns = {}) #:nodoc: case partial_path when String, Symbol, NilClass # Render the template ActionView::PartialTemplate.new(self, partial_path, object_assigns, local_assigns).render_template when ActionView::Helpers::FormBuilder builder_partial_path = partial_path.class.to_s.demodulize.underscore.sub(/_builder$/, '') render_partial(builder_partial_path, object_assigns, (local_assigns || {}).merge(builder_partial_path.to_sym => partial_path)) when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope if partial_path.any? collection = partial_path render_partial_collection(nil, collection, nil, local_assigns) else "" end else render_partial(ActionController::RecordIdentifier.partial_path(partial_path, controller.class.controller_path), partial_path, local_assigns) end end


