aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-09 15:58:12 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-09 15:58:12 +0000
commit73c70836515879f69a152535f3ab411acc3317b8 (patch)
tree849d2c9363ac135798bbd111f130226edbab932d
parentfa602bb86d31450c488d087b00c2d12198ab6ec8 (diff)
downloadrails-73c70836515879f69a152535f3ab411acc3317b8.tar.gz
rails-73c70836515879f69a152535f3ab411acc3317b8.tar.bz2
rails-73c70836515879f69a152535f3ab411acc3317b8.zip
Rename fieldset_tag to field_set_tag to follow the conventions from text_area and text_field [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7423 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb6
-rw-r--r--actionpack/test/template/form_tag_helper_test.rb8
3 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 33cf662375..a7b7f1f7f3 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -11,7 +11,7 @@
* Fix layout overriding response status. #9476 [lotswholetime]
-* Add fieldset_tag for generating fieldsets, closes #9477. [djanowski]
+* Add field_set_tag for generating field_sets, closes #9477. [djanowski]
* Allow additional parameters to be passed to named route helpers when using positional arguments. Closes #8930 [ian.w.white@gmail.com]
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index 39e508f433..d8e8f2005e 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -369,16 +369,16 @@ module ActionView
# <tt>legend</tt> will become the fieldset's title (optional as per W3C).
#
# === Examples
- # <% fieldset_tag do %>
+ # <% field_set_tag do %>
# <p><%= text_field_tag 'name' %></p>
# <% end %>
# # => <fieldset><p><input id="name" name="name" type="text" /></p></fieldset>
#
- # <% fieldset_tag 'Your details' do %>
+ # <% field_set_tag 'Your details' do %>
# <p><%= text_field_tag 'name' %></p>
# <% end %>
# # => <fieldset><legend>Your details</legend><p><input id="name" name="name" type="text" /></p></fieldset>
- def fieldset_tag(legend = nil, &block)
+ def field_set_tag(legend = nil, &block)
content = capture(&block)
concat(tag(:fieldset, {}, true), block.binding)
concat(content_tag(:legend, legend), block.binding) unless legend.blank?
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb
index c2cdd7666c..c582c26c68 100644
--- a/actionpack/test/template/form_tag_helper_test.rb
+++ b/actionpack/test/template/form_tag_helper_test.rb
@@ -158,21 +158,21 @@ class FormTagHelperTest < Test::Unit::TestCase
assert_equal 1, 1
end
- def test_fieldset_tag
+ def test_field_set_tag
_erbout = ''
- fieldset_tag("Your details") { _erbout.concat "Hello world!" }
+ field_set_tag("Your details") { _erbout.concat "Hello world!" }
expected = %(<fieldset><legend>Your details</legend>Hello world!</fieldset>)
assert_dom_equal expected, _erbout
_erbout = ''
- fieldset_tag { _erbout.concat "Hello world!" }
+ field_set_tag { _erbout.concat "Hello world!" }
expected = %(<fieldset>Hello world!</fieldset>)
assert_dom_equal expected, _erbout
_erbout = ''
- fieldset_tag('') { _erbout.concat "Hello world!" }
+ field_set_tag('') { _erbout.concat "Hello world!" }
expected = %(<fieldset>Hello world!</fieldset>)
assert_dom_equal expected, _erbout