Class: ActionView::ObjectRenderer
- Inherits:
-
PartialRenderer
- Object
- AbstractRenderer
- PartialRenderer
- ActionView::ObjectRenderer
- Includes:
- ObjectRendering
- Defined in:
- 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 inherited from AbstractRenderer
Constructor Details
#initialize(lookup_context, options) ⇒ ObjectRenderer
Returns a new instance of ObjectRenderer.
7 8 9 10 11 |
# File '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 '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 '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 |