Permalink
Browse files

Premature commit

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 8dca658 commit 033a5148eb03a6b4a3441cdf0c4cbda357c6d702 @dhh dhh committed Nov 30, 2006
@@ -223,11 +223,6 @@ def check_box(object_name, method, options = {}, checked_value = "1", unchecked_
def radio_button(object_name, method, tag_value, options = {})
InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_radio_button_tag(tag_value, options)
end
-
-
- def label(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_label_tag(options)
- end
end
class InstanceTag #:nodoc:
@@ -333,10 +328,6 @@ def to_boolean_select_tag(options = {})
tag_text << ">True</option></select>"
end
- def to_label_tag(options = {})
- label_tag(options.delete(:text) || value(object).humanize, options.reverse_merge(:for => tag_id))
- end
-
def to_content_tag(tag_name, options = {})
content_tag(tag_name, value(object), options)
end
@@ -153,11 +153,6 @@ def radio_button_tag(name, value, checked = false, options = {})
tag :input, html_options
end
- # Creates a label tag.
- def label_tag(text, options = {})
- content_tag :label, text, options
- end
-
# Creates a submit button with the text <tt>value</tt> as the caption. If options contains a pair with the key of "disable_with",
# then the value will be used to rename a disabled version of the submit button.
def submit_tag(value = "Save changes", options = {})
@@ -163,12 +163,6 @@ def test_date_selects
)
end
- def test_label
- assert_dom_equal('<label for="post_body">Body</label>', label("post", "body"))
- assert_dom_equal('<label for="post_body">Super body</label>', label("post", "body", :text => "Super body"))
- assert_dom_equal('<label for="post_body" class="strong">Super body</label>', label("post", "body", :text => "Super body", :class => "strong"))
- end
-
def test_explicit_name
assert_dom_equal(
'<input id="post_title" name="dont guess" size="30" type="text" value="Hello World" />', text_field("post", "title", "name" => "dont guess")

0 comments on commit 033a514

Please sign in to comment.