diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-14 15:23:25 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-14 15:23:25 -0700 |
commit | 9808cdfa03b41173b13e03469a0f456d0b975c95 (patch) | |
tree | 126edbe098ef66097ea8960acac7cd1015eddbf5 /actionpack | |
parent | 167db914edba809ac93db9cd7d2d4da26a6b04c9 (diff) | |
download | rails-9808cdfa03b41173b13e03469a0f456d0b975c95.tar.gz rails-9808cdfa03b41173b13e03469a0f456d0b975c95.tar.bz2 rails-9808cdfa03b41173b13e03469a0f456d0b975c95.zip |
initialize `@renderer` to avoid ivar warnings
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. |