diff options
author | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-23 10:29:22 +0100 |
---|---|---|
committer | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-23 10:29:22 +0100 |
commit | 502028a32bfa46ad18337d2a69f03e8b5dec3c4a (patch) | |
tree | f833f741c9516735d8333c589bebc2ae253c60ae /actionpack/lib/action_controller | |
parent | 5c3ef8c17dba23d000d301467b1a620811c940b6 (diff) | |
download | rails-502028a32bfa46ad18337d2a69f03e8b5dec3c4a.tar.gz rails-502028a32bfa46ad18337d2a69f03e8b5dec3c4a.tar.bz2 rails-502028a32bfa46ad18337d2a69f03e8b5dec3c4a.zip |
Move double render check out of AbstractController.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 72e2bbd00e..8f03035b2b 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -13,6 +13,10 @@ module ActionController end def render(*args) + if response_body + raise ::AbstractController::DoubleRenderError + end + args << {} unless args.last.is_a?(Hash) super(*args) self.content_type ||= args.last[:_template].mime_type.to_s |