Skip to content
This repository
Browse code

Premature commit

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 033a5148eb03a6b4a3441cdf0c4cbda357c6d702 1 parent 8dca658
David Heinemeier Hansson authored November 30, 2006
9  actionpack/lib/action_view/helpers/form_helper.rb
@@ -223,11 +223,6 @@ def check_box(object_name, method, options = {}, checked_value = "1", unchecked_
223 223
       def radio_button(object_name, method, tag_value, options = {})
224 224
         InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_radio_button_tag(tag_value, options)
225 225
       end
226  
-      
227  
-      
228  
-      def label(object_name, method, options = {})
229  
-        InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_label_tag(options)
230  
-      end
231 226
     end
232 227
 
233 228
     class InstanceTag #:nodoc:
@@ -333,10 +328,6 @@ def to_boolean_select_tag(options = {})
333 328
         tag_text << ">True</option></select>"
334 329
       end
335 330
       
336  
-      def to_label_tag(options = {})
337  
-        label_tag(options.delete(:text) || value(object).humanize, options.reverse_merge(:for => tag_id))
338  
-      end
339  
-      
340 331
       def to_content_tag(tag_name, options = {})
341 332
         content_tag(tag_name, value(object), options)
342 333
       end
5  actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -153,11 +153,6 @@ def radio_button_tag(name, value, checked = false, options = {})
153 153
         tag :input, html_options
154 154
       end
155 155
 
156  
-      # Creates a label tag.
157  
-      def label_tag(text, options = {})
158  
-        content_tag :label, text, options
159  
-      end
160  
-
161 156
       # Creates a submit button with the text <tt>value</tt> as the caption. If options contains a pair with the key of "disable_with",
162 157
       # then the value will be used to rename a disabled version of the submit button.
163 158
       def submit_tag(value = "Save changes", options = {})
6  actionpack/test/template/form_helper_test.rb
@@ -163,12 +163,6 @@ def test_date_selects
163 163
     )
164 164
   end
165 165
 
166  
-  def test_label
167  
-    assert_dom_equal('<label for="post_body">Body</label>', label("post", "body"))
168  
-    assert_dom_equal('<label for="post_body">Super body</label>', label("post", "body", :text => "Super body"))
169  
-    assert_dom_equal('<label for="post_body" class="strong">Super body</label>', label("post", "body", :text => "Super body", :class => "strong"))
170  
-  end
171  
-
172 166
   def test_explicit_name
173 167
     assert_dom_equal(
174 168
       '<input id="post_title" name="dont guess" size="30" type="text" value="Hello World" />', text_field("post", "title", "name" => "dont guess")

0 notes on commit 033a514

Please sign in to comment.
Something went wrong with that request. Please try again.