diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index d054450853..5055a88217 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -13,13 +13,20 @@ module ActionController RENDERER_LOCK = Mutex.new - # Returns a renderer class (inherited from ActionController::Renderer) + attr_writer :renderer + + # Returns a renderer instance (inherited from ActionController::Renderer) # for the controller. def renderer @renderer || RENDERER_LOCK.synchronize do @renderer ||= Renderer.for(self) end end + + def inherited(klass) + klass.renderer = nil + super + end end # Before processing, set the request formats in current controller formats. |