aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/html/javascripts/prototype.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/html/javascripts/prototype.js b/railties/html/javascripts/prototype.js
index 0caf9cd7f0..5ba3a30218 100644
--- a/railties/html/javascripts/prototype.js
+++ b/railties/html/javascripts/prototype.js
@@ -669,6 +669,12 @@ Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
var parameters = this.options.parameters || '';
if (parameters.length > 0) parameters += '&_=';
+ /* Simulate other verbs over post */
+ if (this.options.method != 'get' && this.options.method != 'post') {
+ parameters += (parameters.length > 0 ? '&' : '') + '_method=' + this.options.method
+ this.options.method = 'post'
+ }
+
try {
this.url = url;
if (this.options.method == 'get' && parameters.length > 0)