aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/rendering.rb
diff options
context:
space:
mode:
authorJosé Valim and Mikel Lindsaar <pair@programming.com>2010-01-23 10:29:22 +0100
committerJosé Valim and Mikel Lindsaar <pair@programming.com>2010-01-23 10:29:22 +0100
commit502028a32bfa46ad18337d2a69f03e8b5dec3c4a (patch)
treef833f741c9516735d8333c589bebc2ae253c60ae /actionpack/lib/action_controller/metal/rendering.rb
parent5c3ef8c17dba23d000d301467b1a620811c940b6 (diff)
downloadrails-502028a32bfa46ad18337d2a69f03e8b5dec3c4a.tar.gz
rails-502028a32bfa46ad18337d2a69f03e8b5dec3c4a.tar.bz2
rails-502028a32bfa46ad18337d2a69f03e8b5dec3c4a.zip
Move double render check out of AbstractController.
Diffstat (limited to 'actionpack/lib/action_controller/metal/rendering.rb')
-rw-r--r--actionpack/lib/action_controller/metal/rendering.rb4
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