Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7423

Show
Ignore:
Timestamp:
09/09/07 15:58:12 (1 year ago)
Author:
david
Message:

Rename fieldset_tag to field_set_tag to follow the conventions from text_area and text_field [DHH]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r7421 r7423  
    1212* Fix layout overriding response status.  #9476 [lotswholetime] 
    1313 
    14 * Add fieldset_tag for generating fieldsets, closes #9477. [djanowski] 
     14* Add field_set_tag for generating field_sets, closes #9477. [djanowski] 
    1515 
    1616* Allow additional parameters to be passed to named route helpers when using positional arguments.  Closes #8930 [ian.w.white@gmail.com] 
  • trunk/actionpack/lib/action_view/helpers/form_tag_helper.rb

    r7413 r7423  
    370370      # 
    371371      # === Examples 
    372       #   <% fieldset_tag do %> 
     372      #   <% field_set_tag do %> 
    373373      #     <p><%= text_field_tag 'name' %></p> 
    374374      #   <% end %> 
    375375      #   # => <fieldset><p><input id="name" name="name" type="text" /></p></fieldset> 
    376376      # 
    377       #   <% fieldset_tag 'Your details' do %> 
     377      #   <% field_set_tag 'Your details' do %> 
    378378      #     <p><%= text_field_tag 'name' %></p> 
    379379      #   <% end %> 
    380380      #   # => <fieldset><legend>Your details</legend><p><input id="name" name="name" type="text" /></p></fieldset> 
    381       def fieldset_tag(legend = nil, &block) 
     381      def field_set_tag(legend = nil, &block) 
    382382        content = capture(&block) 
    383383        concat(tag(:fieldset, {}, true), block.binding) 
  • trunk/actionpack/test/template/form_tag_helper_test.rb

    r7413 r7423  
    159159  end 
    160160 
    161   def test_fieldset_tag 
     161  def test_field_set_tag 
    162162    _erbout = '' 
    163     fieldset_tag("Your details") { _erbout.concat "Hello world!" } 
     163    field_set_tag("Your details") { _erbout.concat "Hello world!" } 
    164164 
    165165    expected = %(<fieldset><legend>Your details</legend>Hello world!</fieldset>) 
     
    167167 
    168168    _erbout = '' 
    169     fieldset_tag { _erbout.concat "Hello world!" } 
     169    field_set_tag { _erbout.concat "Hello world!" } 
    170170 
    171171    expected = %(<fieldset>Hello world!</fieldset>) 
     
    173173     
    174174    _erbout = '' 
    175     fieldset_tag('') { _erbout.concat "Hello world!" } 
     175    field_set_tag('') { _erbout.concat "Hello world!" } 
    176176 
    177177    expected = %(<fieldset>Hello world!</fieldset>)