aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-18 16:25:11 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-18 16:25:11 +0000
commit129a159d1247b2bc9cc791a81ef3485e5b061648 (patch)
tree1a9f6bffb9336fa5812d7afd18b3b7a5df2f576a /actionpack/lib
parentc2fb8ca393569105cb25bd79d1bf018c20cce51a (diff)
downloadrails-129a159d1247b2bc9cc791a81ef3485e5b061648.tar.gz
rails-129a159d1247b2bc9cc791a81ef3485e5b061648.tar.bz2
rails-129a159d1247b2bc9cc791a81ef3485e5b061648.zip
Fixed link_to "somewhere", :post => true to produce valid XHTML by using the parentnode instead of document.body for the instant form (closes #3007) [Bob Silva]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3928 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index b3dd58370e..1abe1b1220 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -269,7 +269,7 @@ module ActionView
end
def post_javascript_function
- "var f = document.createElement('form'); document.body.appendChild(f); f.method = 'POST'; f.action = this.href; f.submit();"
+ "var f = document.createElement('form'); this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href; f.submit();"
end
# Processes the _html_options_ hash, converting the boolean