aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/javascripts
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-11 01:23:29 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-11 01:23:29 +0000
commit1c16649b4895012eac76f3a7f22f3382b0034a97 (patch)
tree6674f67a9ea89529b02164a08e076e51b82a1bf1 /actionpack/lib/action_view/helpers/javascripts
parent8152695b809aa47177ab5d5db43d93d8f55ee52a (diff)
downloadrails-1c16649b4895012eac76f3a7f22f3382b0034a97.tar.gz
rails-1c16649b4895012eac76f3a7f22f3382b0034a97.tar.bz2
rails-1c16649b4895012eac76f3a7f22f3382b0034a97.zip
Added better support for using the same actions to output for different sources depending on the Accept header [DHH] Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/javascripts')
-rw-r--r--actionpack/lib/action_view/helpers/javascripts/prototype.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/javascripts/prototype.js b/actionpack/lib/action_view/helpers/javascripts/prototype.js
index c528a4956d..5093f40189 100644
--- a/actionpack/lib/action_view/helpers/javascripts/prototype.js
+++ b/actionpack/lib/action_view/helpers/javascripts/prototype.js
@@ -703,7 +703,8 @@ Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
setRequestHeaders: function() {
var requestHeaders =
['X-Requested-With', 'XMLHttpRequest',
- 'X-Prototype-Version', Prototype.Version];
+ 'X-Prototype-Version', Prototype.Version,
+ 'Accept', 'text/javascript; text/html; text/xml; */*' ];
if (this.options.method == 'post') {
requestHeaders.push('Content-type',