From 85a5deacdc1f0d1a56a07429a03dfa0cf8cc7f78 Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson
Date: Sun, 12 Dec 2004 11:17:25 +0000
Subject: Use lower-case post instead of POST as form method for XHTML
compliance #290 [Scott Baron]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
---
actionpack/lib/action_view/helpers/active_record_helper.rb | 6 +++---
actionpack/lib/action_view/helpers/tag_helper.rb | 4 ++--
actionpack/test/template/active_record_helper_test.rb | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
(limited to 'actionpack')
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb
index 7066121c28..eee8b6b970 100644
--- a/actionpack/lib/action_view/helpers/active_record_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -24,7 +24,7 @@ module ActionView
# Returns an entire form with input tags and everything for a specified Active Record object. Example
# (post is a new record that has a title using VARCHAR and a body using TEXT):
# form("post") =>
- # "
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb
index dc71826614..13aa9297ca 100644
--- a/actionpack/lib/action_view/helpers/tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/tag_helper.rb
@@ -24,7 +24,7 @@ module ActionView
# Starts a form tag that points the action to an url configured with url_for_options just like
# ActionController::Base#url_for.
def form_tag(url_for_options = {}, options = {}, *parameters_for_url)
- html_options = { "method" => "POST" }.merge(options)
+ html_options = { "method" => "post" }.merge(options)
if html_options[:multipart]
html_options["enctype"] = "multipart/form-data"
@@ -56,4 +56,4 @@ module ActionView
end
end
end
-end
\ No newline at end of file
+end
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb
index 12ab78796b..9cc0f58d0a 100644
--- a/actionpack/test/template/active_record_helper_test.rb
+++ b/actionpack/test/template/active_record_helper_test.rb
@@ -71,7 +71,7 @@ class ActiveRecordHelperTest < Test::Unit::TestCase
def test_form_with_string
assert_equal(
- "
",
+ "",
form("post")
)
end
@@ -80,7 +80,7 @@ class ActiveRecordHelperTest < Test::Unit::TestCase
def Post.content_columns() [ Column.new(:date, "written_on", "Written on") ] end
assert_equal(
- "",
+ "",
form("post")
)
end
@@ -90,7 +90,7 @@ class ActiveRecordHelperTest < Test::Unit::TestCase
@post.written_on = Time.gm(2004, 6, 15, 16, 30)
assert_equal(
- "",
+ "",
form("post")
)
end
@@ -99,4 +99,4 @@ class ActiveRecordHelperTest < Test::Unit::TestCase
assert_equal "
1 error prohibited this post from being saved
There were problems with the following fields:
Author name can't be empty
", error_messages_for("post")
assert_equal "
1 error prohibited this post from being saved
There were problems with the following fields:
Author name can't be empty
", error_messages_for("post", :class => "errorDeathByClass", :id => "errorDeathById", :header_tag => "h1")
end
-end
\ No newline at end of file
+end
--
cgit v1.2.3