aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/renderer/renderer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/renderer/renderer.rb')
-rw-r--r--actionpack/lib/action_view/renderer/renderer.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/renderer/renderer.rb b/actionpack/lib/action_view/renderer/renderer.rb
index 3c0126f6bb..1fa51d276f 100644
--- a/actionpack/lib/action_view/renderer/renderer.rb
+++ b/actionpack/lib/action_view/renderer/renderer.rb
@@ -10,6 +10,15 @@ module ActionView
@controller = controller
end
+ # Main render entry point shared by AV and AC.
+ def render(context, options)
+ if options.key?(:partial)
+ render_partial(context, options)
+ else
+ render_template(context, options)
+ end
+ end
+
# Render but returns a valid Rack body. If fibers are defined, we return
# a streaming body that renders the template piece by piece.
#