aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/head.rb
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-02-26 15:56:17 -0800
committerCarlhuda <carlhuda@engineyard.com>2010-02-26 15:56:17 -0800
commitdae109a4632af702b8556ecf029a27d91476848b (patch)
tree865eda97f82e56d060949fdaeed026bcf544b158 /actionpack/lib/action_controller/metal/head.rb
parent3bad24c85d973295df55a04272a4e1829eab4685 (diff)
downloadrails-dae109a4632af702b8556ecf029a27d91476848b.tar.gz
rails-dae109a4632af702b8556ecf029a27d91476848b.tar.bz2
rails-dae109a4632af702b8556ecf029a27d91476848b.zip
Including UrlFor in Redirecting and Head will warn usefully if a controller is wired up without a router included (and still support redirect_to "omg")
Diffstat (limited to 'actionpack/lib/action_controller/metal/head.rb')
-rw-r--r--actionpack/lib/action_controller/metal/head.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/head.rb b/actionpack/lib/action_controller/metal/head.rb
index fe6e6186a5..a5c9910d68 100644
--- a/actionpack/lib/action_controller/metal/head.rb
+++ b/actionpack/lib/action_controller/metal/head.rb
@@ -2,6 +2,8 @@ module ActionController
module Head
extend ActiveSupport::Concern
+ include ActionController::UrlFor
+
# Return a response that has no content (merely headers). The options
# argument is interpreted to be a hash of header names and values.
# This allows you to easily return a response that consists only of
@@ -24,9 +26,6 @@ module ActionController
end
self.status = status
- # ROUTES TODO: Figure out how to rescue from a no method error
- # This is needed only if you wire up a controller yourself, and
- # this not working would be baffling without a better error
self.location = url_for(location) if location
self.content_type = Mime[formats.first]
self.response_body = " "