mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from now on. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
f7c916ece6
commit
d4e35666d1
3 changed files with 32 additions and 0 deletions
|
@ -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]
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue