diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 75650606685b94ba5cfc84fd30b398ac46002cd7..c50cb5e927ecf11d59c32a396c7d32281fcde8a6 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,5 +1,9 @@
## Rails 4.0.0 (unreleased) ##
+* Removed default `size` option from the `text_field`, `search_field`, `telephone_field`, `url_field`, `email_field` helpers. *Philip Arndt*
+
+* Removed default `cols` and `rows` options from the `text_area` helper. *Philip Arndt*
+
* Adds support for layouts when rendering a partial with a given collection. *serabe*
* Allows the route helper `root` to take a string argument. For example, `root 'pages#main'`. *bcardarella*
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 7492ef56c6988830e33e3bad4f63e097a036f78d..835111eb9528e37f7fb02d817588818b7744c180 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -45,10 +45,10 @@ module Helpers
#
#
# :
- #
+ #
#
# :
- #
+ #
#
#
#
@@ -76,10 +76,10 @@ module Helpers
#
#
# :
- #
+ #
#
# :
- #
+ #
#
#
#
@@ -860,20 +860,20 @@ def radio_button(object_name, method, tag_value, options = {})
# ==== Examples
#
# search_field(:user, :name)
- # # =>
+ # # =>
# search_field(:user, :name, :autosave => false)
- # # =>
+ # # =>
# search_field(:user, :name, :results => 3)
- # # =>
+ # # =>
# # Assume request.host returns "www.example.com"
# search_field(:user, :name, :autosave => true)
- # # =>
+ # # =>
# search_field(:user, :name, :onsearch => true)
- # # =>
+ # # =>
# search_field(:user, :name, :autosave => false, :onsearch => true)
- # # =>
+ # # =>
# search_field(:user, :name, :autosave => true, :onsearch => true)
- # # =>
+ # # =>
#
def search_field(object_name, method, options = {})
Tags::SearchField.new(object_name, method, self, options).render
@@ -882,7 +882,7 @@ def search_field(object_name, method, options = {})
# Returns a text_field of type "tel".
#
# telephone_field("user", "phone")
- # # =>
+ # # =>
#
def telephone_field(object_name, method, options = {})
Tags::TelField.new(object_name, method, self, options).render
@@ -910,7 +910,7 @@ def date_field(object_name, method, options = {})
# Returns a text_field of type "url".
#
# url_field("user", "homepage")
- # # =>
+ # # =>
#
def url_field(object_name, method, options = {})
Tags::UrlField.new(object_name, method, self, options).render
@@ -919,7 +919,7 @@ def url_field(object_name, method, options = {})
# Returns a text_field of type "email".
#
# email_field("user", "address")
- # # =>
+ # # =>
#
def email_field(object_name, method, options = {})
Tags::EmailField.new(object_name, method, self, options).render
diff --git a/actionpack/lib/action_view/helpers/tags/base.rb b/actionpack/lib/action_view/helpers/tags/base.rb
index 22c16de057606b0d561ee3d1a7bc0676d3b81ea1..14323a389137236c5e00813e2da91da04d681660 100644
--- a/actionpack/lib/action_view/helpers/tags/base.rb
+++ b/actionpack/lib/action_view/helpers/tags/base.rb
@@ -5,8 +5,6 @@ class Base #:nodoc:
include Helpers::ActiveModelInstanceTag, Helpers::TagHelper, Helpers::FormTagHelper
include FormOptionsHelper
- DEFAULT_FIELD_OPTIONS = { "size" => 30 }
-
attr_reader :object
def initialize(object_name, method_name, template_object, options = {})
diff --git a/actionpack/lib/action_view/helpers/tags/text_area.rb b/actionpack/lib/action_view/helpers/tags/text_area.rb
index 461a049fc2007acf985f7bc06724c49d244ccb46..2e48850d5c157c6a3ae7d34692abe1ce86e533b7 100644
--- a/actionpack/lib/action_view/helpers/tags/text_area.rb
+++ b/actionpack/lib/action_view/helpers/tags/text_area.rb
@@ -2,10 +2,8 @@ module ActionView
module Helpers
module Tags
class TextArea < Base #:nodoc:
- DEFAULT_TEXT_AREA_OPTIONS = { "cols" => 40, "rows" => 20 }
-
def render
- options = DEFAULT_TEXT_AREA_OPTIONS.merge(@options.stringify_keys)
+ options = @options.stringify_keys
add_default_name_and_id(options)
if size = options.delete("size")
diff --git a/actionpack/lib/action_view/helpers/tags/text_field.rb b/actionpack/lib/action_view/helpers/tags/text_field.rb
index ce5182d20fa83edf4fd0182b8a6070e071556c7f..024a1a8af2a463e72dea5f0805f3bfc000badb7b 100644
--- a/actionpack/lib/action_view/helpers/tags/text_field.rb
+++ b/actionpack/lib/action_view/helpers/tags/text_field.rb
@@ -4,8 +4,7 @@ module Tags
class TextField < Base #:nodoc:
def render
options = @options.stringify_keys
- options["size"] = options["maxlength"] || DEFAULT_FIELD_OPTIONS["size"] unless options.key?("size")
- options = DEFAULT_FIELD_OPTIONS.merge(options)
+ options["size"] = options["maxlength"] unless options.key?("size")
options["type"] ||= field_type
options["value"] = options.fetch("value"){ value_before_type_cast(object) } unless field_type == "file"
options["value"] &&= ERB::Util.html_escape(options["value"])
diff --git a/actionpack/test/template/active_model_helper_test.rb b/actionpack/test/template/active_model_helper_test.rb
index 66a7bce71ef9f79ff91f9d3a6f66a32564c16812..18468ee91a56d9bbcc993e97e38de636286a73a0 100644
--- a/actionpack/test/template/active_model_helper_test.rb
+++ b/actionpack/test/template/active_model_helper_test.rb
@@ -29,14 +29,14 @@ def setup
def test_text_area_with_errors
assert_dom_equal(
- %(
),
+ %(),
text_area("post", "body")
)
end
def test_text_field_with_errors
assert_dom_equal(
- %(),
+ %(),
text_field("post", "author_name")
)
end
@@ -76,7 +76,7 @@ def test_field_error_proc
end
assert_dom_equal(
- %( can't be empty
),
+ %( can't be empty
),
text_field("post", "author_name")
)
ensure
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index 4eed5615f64c0c3bec0dee87aead03efa24c8fe7..bc42e14b8a901e51d749bc933367c51205e6f98f 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -249,35 +249,35 @@ def test_label_with_block_and_options
end
def test_label_with_block_in_erb
- assert_equal "", view.render("test/label_with_block")
+ assert_equal "", view.render("test/label_with_block")
end
def test_text_field
assert_dom_equal(
- '', text_field("post", "title")
+ '', text_field("post", "title")
)
assert_dom_equal(
- '', password_field("post", "title")
+ '', password_field("post", "title")
)
assert_dom_equal(
- '', password_field("post", "title", :value => @post.title)
+ '', password_field("post", "title", :value => @post.title)
)
assert_dom_equal(
- '', password_field("person", "name")
+ '', password_field("person", "name")
)
end
def test_text_field_with_escapes
@post.title = "Hello World"
assert_dom_equal(
- '', text_field("post", "title")
+ '', text_field("post", "title")
)
end
def test_text_field_with_html_entities
@post.title = "The HTML Entity for & is &"
assert_dom_equal(
- '',
+ '',
text_field("post", "title")
)
end
@@ -301,18 +301,18 @@ def test_text_field_removing_size
end
def test_text_field_with_nil_value
- expected = ''
+ expected = ''
assert_dom_equal expected, text_field("post", "title", :value => nil)
end
def test_text_field_with_nil_name
- expected = ''
+ expected = ''
assert_dom_equal expected, text_field("post", "title", :name => nil)
end
def test_text_field_doesnt_change_param_values
object_name = 'post[]'
- expected = ''
+ expected = ''
assert_equal expected, text_field(object_name, "title")
assert_equal object_name, "post[]"
end
@@ -346,7 +346,7 @@ def test_hidden_field_with_options
end
def test_text_field_with_custom_type
- assert_dom_equal '',
+ assert_dom_equal '',
text_field("user", "email", :type => "email")
end
@@ -474,7 +474,7 @@ def test_radio_button_with_booleans
def test_text_area
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body")
)
end
@@ -482,14 +482,14 @@ def test_text_area
def test_text_area_with_escapes
@post.body = "Back to the hill and over it again!"
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body")
)
end
def test_text_area_with_alternate_value
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body", :value => 'Testing alternate values.')
)
end
@@ -497,7 +497,7 @@ def test_text_area_with_alternate_value
def test_text_area_with_html_entities
@post.body = "The HTML Entity for & is &"
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body")
)
end
@@ -510,12 +510,12 @@ def test_text_area_with_size_option
end
def test_search_field
- expected = %{}
+ expected = %{}
assert_dom_equal(expected, search_field("contact", "notes_query"))
end
def test_telephone_field
- expected = %{}
+ expected = %{}
assert_dom_equal(expected, telephone_field("user", "cell"))
end
@@ -546,12 +546,12 @@ def test_date_field_with_nil_value
end
def test_url_field
- expected = %{}
+ expected = %{}
assert_dom_equal(expected, url_field("user", "homepage"))
end
def test_email_field
- expected = %{}
+ expected = %{}
assert_dom_equal(expected, email_field("user", "address"))
end
@@ -571,10 +571,10 @@ def test_range_input
def test_explicit_name
assert_dom_equal(
- '', text_field("post", "title", "name" => "dont guess")
+ '', text_field("post", "title", "name" => "dont guess")
)
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body", "name" => "really!")
)
assert_dom_equal(
@@ -591,10 +591,10 @@ def test_explicit_name
def test_explicit_id
assert_dom_equal(
- '', text_field("post", "title", "id" => "dont guess")
+ '', text_field("post", "title", "id" => "dont guess")
)
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body", "id" => "really!")
)
assert_dom_equal(
@@ -611,10 +611,10 @@ def test_explicit_id
def test_nil_id
assert_dom_equal(
- '', text_field("post", "title", "id" => nil)
+ '', text_field("post", "title", "id" => nil)
)
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body", "id" => nil)
)
assert_dom_equal(
@@ -641,11 +641,11 @@ def test_nil_id
def test_index
assert_dom_equal(
- '',
+ '',
text_field("post", "title", "index" => 5)
)
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body", "index" => 5)
)
assert_dom_equal(
@@ -668,11 +668,11 @@ def test_index
def test_index_with_nil_id
assert_dom_equal(
- '',
+ '',
text_field("post", "title", "index" => 5, 'id' => nil)
)
assert_dom_equal(
- %{},
+ %{},
text_area("post", "body", "index" => 5, 'id' => nil)
)
assert_dom_equal(
@@ -700,10 +700,10 @@ def test_auto_index
label("post[]", "title")
)
assert_dom_equal(
- "", text_field("post[]","title")
+ "", text_field("post[]","title")
)
assert_dom_equal(
- "",
+ "",
text_area("post[]", "body")
)
assert_dom_equal(
@@ -722,11 +722,11 @@ def test_auto_index
def test_auto_index_with_nil_id
pid = 123
assert_dom_equal(
- "",
+ "",
text_field("post[]","title", :id => nil)
)
assert_dom_equal(
- "",
+ "",
text_area("post[]", "body", :id => nil)
)
assert_dom_equal(
@@ -760,8 +760,8 @@ def test_form_for
expected = whole_form("/posts/123", "create-post" , "edit_post", :method => 'patch') do
"" +
- "" +
- "" +
+ "" +
+ "" +
"" +
"" +
"" +
@@ -859,7 +859,7 @@ def test_form_for_with_model_using_relative_model_naming
end
expected = whole_form("/posts/44", "edit_post_44" , "edit_post", :method => 'patch') do
- "" +
+ "" +
""
end
@@ -877,8 +877,8 @@ def test_form_for_with_symbol_object_name
expected = whole_form("/posts/123", "create-post", "edit_other_name", :method => 'patch') do
"" +
- "" +
- "" +
+ "" +
+ "" +
"" +
"" +
""
@@ -895,8 +895,8 @@ def test_form_for_with_method_as_part_of_html_options
end
expected = whole_form("/", "create-post", "edit_post", "delete") do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -912,8 +912,8 @@ def test_form_for_with_method
end
expected = whole_form("/", "create-post", "edit_post", "delete") do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -929,7 +929,7 @@ def test_form_for_with_search_field
end
expected = whole_form("/search", "search-post", "new_post", "get") do
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -943,8 +943,8 @@ def test_form_for_with_remote
end
expected = whole_form("/", "create-post", "edit_post", :method => 'patch', :remote => true) do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -960,8 +960,8 @@ def test_form_for_with_remote_in_html
end
expected = whole_form("/", "create-post", "edit_post", :method => 'patch', :remote => true) do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -979,8 +979,8 @@ def test_form_for_with_remote_without_html
end
expected = whole_form("/posts", 'new_post', 'new_post', :remote => true) do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -996,8 +996,8 @@ def test_form_for_without_object
end
expected = whole_form("/", "create-post") do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -1015,8 +1015,8 @@ def test_form_for_with_index
expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do
"" +
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -1032,8 +1032,8 @@ def test_form_for_with_nil_index_option_override
end
expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -1049,8 +1049,8 @@ def test_form_for_with_namespace
end
expected = whole_form('/posts/123', 'namespace_edit_post_123', 'edit_post', 'patch') do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -1066,7 +1066,7 @@ def test_form_for_with_namespace_with_label
expected = whole_form('/posts/123', 'namespace_edit_post_123', 'edit_post', 'patch') do
"" +
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1080,7 +1080,7 @@ def test_two_form_for_with_namespace
expected_1 = whole_form('/posts/123', 'namespace_1_edit_post_123', 'edit_post', 'patch') do
"" +
- ""
+ ""
end
assert_dom_equal expected_1, output_buffer
@@ -1092,7 +1092,7 @@ def test_two_form_for_with_namespace
expected_2 = whole_form('/posts/123', 'namespace_2_edit_post_123', 'edit_post', 'patch') do
"" +
- ""
+ ""
end
assert_dom_equal expected_2, output_buffer
@@ -1109,9 +1109,9 @@ def test_fields_for_with_namespace
end
expected = whole_form('/posts/123', 'namespace_edit_post_123', 'edit_post', 'patch') do
- "" +
- "" +
- ""
+ "" +
+ "" +
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1192,7 +1192,7 @@ def test_nested_fields_for
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1207,8 +1207,8 @@ def test_nested_fields_for_with_nested_collections
end
expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do
- "" +
- ""
+ "" +
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1223,8 +1223,8 @@ def test_nested_fields_for_with_index_and_parent_fields
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', 'patch') do
- "" +
- ""
+ "" +
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1238,7 +1238,7 @@ def test_form_for_with_index_and_nested_fields_for
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', 'patch') do
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1252,7 +1252,7 @@ def test_nested_fields_for_with_index_on_both
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', 'patch') do
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1266,7 +1266,7 @@ def test_nested_fields_for_with_auto_index
end
expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1294,7 +1294,7 @@ def test_nested_fields_for_with_auto_index_on_both
end
expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1314,9 +1314,9 @@ def test_nested_fields_for_with_index_and_auto_index
end
expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do
- ""
+ ""
end + whole_form('/posts/123', 'edit_post', 'edit_post', 'patch') do
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -1333,8 +1333,8 @@ def test_nested_fields_for_with_a_new_record_on_a_nested_attributes_one_to_one_a
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- ''
+ '' +
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1360,8 +1360,8 @@ def test_nested_fields_for_with_an_existing_record_on_a_nested_attributes_one_to
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
''
end
@@ -1379,8 +1379,8 @@ def test_nested_fields_for_with_an_existing_record_on_a_nested_attributes_one_to
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
''
end
@@ -1398,8 +1398,8 @@ def test_nested_fields_for_with_an_existing_record_on_a_nested_attributes_one_to
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- ''
+ '' +
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1416,8 +1416,8 @@ def test_nested_fields_for_with_an_existing_record_on_a_nested_attributes_one_to
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- ''
+ '' +
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1434,8 +1434,8 @@ def test_nested_fields_for_with_an_existing_record_on_a_nested_attributes_one_to
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
''
end
@@ -1454,9 +1454,9 @@ def test_nested_fields_for_with_existing_records_on_a_nested_attributes_one_to_o
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
+ '' +
'' +
- ''
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1475,10 +1475,10 @@ def test_nested_fields_for_with_existing_records_on_a_nested_attributes_collecti
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- '' +
+ '' +
''
end
@@ -1502,11 +1502,11 @@ def test_nested_fields_for_with_existing_records_on_a_nested_attributes_collecti
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- '' +
- ''
+ '' +
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1529,10 +1529,10 @@ def test_nested_fields_for_with_existing_records_on_a_nested_attributes_collecti
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
- '' +
- ''
+ '' +
+ '' +
+ '' +
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1555,11 +1555,11 @@ def test_nested_fields_for_with_existing_records_on_a_nested_attributes_collecti
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- '' +
- ''
+ '' +
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1578,10 +1578,10 @@ def test_nested_fields_for_with_existing_records_on_a_nested_attributes_collecti
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- '' +
+ '' +
''
end
@@ -1602,11 +1602,11 @@ def test_nested_fields_for_with_existing_records_on_a_nested_attributes_collecti
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
+ '' +
'' +
- '' +
+ '' +
'' +
- ''
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1625,9 +1625,9 @@ def test_nested_fields_for_with_new_records_on_a_nested_attributes_collection_as
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
- ''
+ '' +
+ '' +
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1646,10 +1646,10 @@ def test_nested_fields_for_with_existing_and_new_records_on_a_nested_attributes_
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- ''
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1664,7 +1664,7 @@ def test_nested_fields_for_with_an_empty_supplied_attributes_collection
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- ''
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1681,10 +1681,10 @@ def test_nested_fields_for_with_existing_records_on_a_supplied_nested_attributes
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- '' +
+ '' +
''
end
@@ -1702,10 +1702,10 @@ def test_nested_fields_for_arel_like
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- '' +
+ '' +
''
end
@@ -1724,10 +1724,10 @@ def test_nested_fields_for_with_existing_records_on_a_supplied_nested_attributes
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- '' +
+ '' +
''
end
@@ -1747,10 +1747,10 @@ def test_nested_fields_for_on_a_nested_attributes_collection_association_yields_
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
- ''
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1767,7 +1767,7 @@ def test_nested_fields_for_with_child_index_option_override_on_a_nested_attribut
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
+ '' +
''
end
@@ -1803,16 +1803,16 @@ def test_nested_fields_uses_unique_indices_for_different_collection_associations
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- '' +
- '' +
+ '' +
+ '' +
'' +
'' +
- '' +
- '' +
+ '' +
+ '' +
'' +
'' +
- '' +
- '' +
+ '' +
+ '' +
'' +
''
end
@@ -1830,7 +1830,7 @@ def test_nested_fields_for_with_hash_like_model
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- ''
+ ''
end
assert_dom_equal expected, output_buffer
@@ -1844,8 +1844,8 @@ def test_fields_for
end
expected =
- "" +
- "" +
+ "" +
+ "" +
"" +
""
@@ -1860,8 +1860,8 @@ def test_fields_for_with_index
end
expected =
- "" +
- "" +
+ "" +
+ "" +
"" +
""
@@ -1876,8 +1876,8 @@ def test_fields_for_with_nil_index_option_override
end
expected =
- "" +
- "" +
+ "" +
+ "" +
"" +
""
@@ -1892,8 +1892,8 @@ def test_fields_for_with_index_option_override
end
expected =
- "" +
- "" +
+ "" +
+ "" +
"" +
""
@@ -1908,8 +1908,8 @@ def test_fields_for_without_object
end
expected =
- "" +
- "" +
+ "" +
+ "" +
"" +
""
@@ -1924,8 +1924,8 @@ def test_fields_for_with_only_object
end
expected =
- "" +
- "" +
+ "" +
+ "" +
"" +
""
@@ -1939,7 +1939,7 @@ def test_fields_for_object_with_bracketed_name
end
assert_dom_equal "" +
- "",
+ "",
output_buffer
end
@@ -1950,7 +1950,7 @@ def test_fields_for_object_with_bracketed_name_and_index
end
assert_dom_equal "" +
- "",
+ "",
output_buffer
end
@@ -1969,8 +1969,8 @@ def test_form_for_and_fields_for
end
expected = whole_form('/posts/123', 'create-post', 'edit_post', :method => 'patch') do
- "" +
- "" +
+ "" +
+ "" +
"" +
""
end
@@ -1989,9 +1989,9 @@ def test_form_for_and_fields_for_with_object
end
expected = whole_form('/posts/123', 'create-post', 'edit_post', :method => 'patch') do
- "" +
- "" +
- ""
+ "" +
+ "" +
+ ""
end
assert_dom_equal expected, output_buffer
@@ -2005,7 +2005,7 @@ def test_form_for_and_fields_for_with_non_nested_association_and_without_object
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', 'patch') do
- ""
+ ""
end
assert_dom_equal expected, output_buffer
@@ -2029,8 +2029,8 @@ def test_form_for_with_labelled_builder
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- "
" +
- "
" +
+ "
" +
+ "
" +
"
"
end
@@ -2048,8 +2048,8 @@ def test_default_form_builder
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do
- "
" +
- "
" +
+ "
" +
+ "
" +
"
"
end
@@ -2066,8 +2066,8 @@ def test_fields_for_with_labelled_builder
end
expected =
- "
" +
- "
" +
+ "
" +
+ "
" +
"
"
assert_dom_equal expected, output_buffer
diff --git a/railties/guides/source/action_view_overview.textile b/railties/guides/source/action_view_overview.textile
index f007629207d775b909998428070bd815a0bcc9f1..42120e9bada0b7041878e32679fd3ee6083cd39d 100644
--- a/railties/guides/source/action_view_overview.textile
+++ b/railties/guides/source/action_view_overview.textile
@@ -431,11 +431,11 @@ form("post")
@@ -451,7 +451,7 @@ For example, if +@post+ has an attribute +title+ mapped to a +String+ column tha
input("post", "title") # =>
-
+
h4. RecordTagHelper
@@ -987,8 +987,8 @@ The HTML generated for this would be:
diff --git a/railties/guides/source/form_helpers.textile b/railties/guides/source/form_helpers.textile
index a696e4f8ae9266e2e3ea3fb2da2b893f3497695b..6d9cd5440bcce2db2b0cb973ebf068f51f8d0741 100644
--- a/railties/guides/source/form_helpers.textile
+++ b/railties/guides/source/form_helpers.textile
@@ -169,11 +169,11 @@ Output:
-
-
+
+
-
-
+
+