diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 28 |
3 files changed, 32 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 55f2058d3d..5c88d89b49 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from now on. [Rick] + * Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag [Rick] * Add a 0 margin/padding div around the hidden _method input tag that form_tag outputs. [Rick] diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index ca6d9e1841..d67a5c6f41 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -63,6 +63,8 @@ module ActionView def end_form_tag "</form>" end + + deprecate :end_form_tag, :start_form_tag # Creates a dropdown selection box, or if the <tt>:multiple</tt> option is set to true, a multiple # choice selection box. diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index df5e0f9e21..7c42f9d4be 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -142,3 +142,31 @@ class FormTagHelperTest < Test::Unit::TestCase end end +class DeprecatedFormTagHelperTest < Test::Unit::TestCase + include ActionView::Helpers::UrlHelper + include ActionView::Helpers::TagHelper + include ActionView::Helpers::FormTagHelper + include ActionView::Helpers::TextHelper + include ActionView::Helpers::CaptureHelper + + def setup + @controller = Class.new do + def url_for(options, *parameters_for_method_reference) + "http://www.example.com" + end + end + @controller = @controller.new + end + + def test_start_form_tag_deprecation + assert_deprecated /start_form_tag/ do + start_form_tag + end + end + + def test_end_form_tag_deprecation + assert_deprecated /end_form_tag/ do + end_form_tag + end + end +end |