aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/head.rb
diff options
context:
space:
mode:
authorYehuda Katz <wycats@yehuda-katz.home>2009-12-20 18:50:47 -0800
committerYehuda Katz <wycats@yehuda-katz.home>2009-12-20 18:50:54 -0800
commit17f66473bce0decb2e5ff23142d4046056ccca1b (patch)
tree3e40db99f5f0aa5f216697b768da364706c33d83 /actionpack/lib/action_controller/metal/head.rb
parenteeda059818ae95620a7c7b86ad0ff2fa621cbe88 (diff)
downloadrails-17f66473bce0decb2e5ff23142d4046056ccca1b.tar.gz
rails-17f66473bce0decb2e5ff23142d4046056ccca1b.tar.bz2
rails-17f66473bce0decb2e5ff23142d4046056ccca1b.zip
AC::Head now doesn't have an unfulfilled Rendering dependency, and instead works just fine standalone (which means that ConditionalGet also doesn't have a Rendering dependency)
Diffstat (limited to 'actionpack/lib/action_controller/metal/head.rb')
-rw-r--r--actionpack/lib/action_controller/metal/head.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/head.rb b/actionpack/lib/action_controller/metal/head.rb
index 68fa0a0402..c82d9cf369 100644
--- a/actionpack/lib/action_controller/metal/head.rb
+++ b/actionpack/lib/action_controller/metal/head.rb
@@ -1,5 +1,7 @@
module ActionController
module Head
+ include 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
@@ -21,7 +23,10 @@ module ActionController
headers[key.to_s.dasherize.split(/-/).map { |v| v.capitalize }.join("-")] = value.to_s
end
- render :nothing => true, :status => status, :location => location
+ self.status = status
+ self.location = url_for(location) if location
+ self.content_type = Mime[formats.first]
+ self.response_body = " "
end
end
end \ No newline at end of file