Class: ActionView::ObjectRenderer
- Inherits:
-
PartialRenderer
- Object
- AbstractRenderer
- PartialRenderer
- ActionView::ObjectRenderer
- Includes:
- ObjectRendering
- Defined in:
- actionview/lib/action_view/renderer/object_renderer.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(lookup_context, options) ⇒ ObjectRenderer
constructor
A new instance of ObjectRenderer.
- #render_object_derive_partial(object, context, block) ⇒ Object
- #render_object_with_partial(object, partial, context, block) ⇒ Object
Methods inherited from PartialRenderer
Methods included from ActiveSupport::Concern
#append_features, #class_methods, extended, #included, #prepend_features, #prepended
Methods inherited from AbstractRenderer
Constructor Details
#initialize(lookup_context, options) ⇒ ObjectRenderer
Returns a new instance of ObjectRenderer.
7 8 9 10 11 |
# File 'actionview/lib/action_view/renderer/object_renderer.rb', line 7 def initialize(lookup_context, ) super @object = nil @local_name = nil end |
Instance Method Details
#render_object_derive_partial(object, context, block) ⇒ Object
19 20 21 22 |
# File 'actionview/lib/action_view/renderer/object_renderer.rb', line 19 def render_object_derive_partial(object, context, block) path = partial_path(object, context) render_object_with_partial(object, path, context, block) end |
#render_object_with_partial(object, partial, context, block) ⇒ Object
13 14 15 16 17 |
# File 'actionview/lib/action_view/renderer/object_renderer.rb', line 13 def render_object_with_partial(object, partial, context, block) @object = object @local_name = local_variable(partial) render(partial, context, block) end |