<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -614,23 +614,27 @@ module ActionView
         end
 
         def tag_name
-          &quot;#{@object_name}[#{@method_name}]&quot;
+          &quot;#{@object_name}[#{sanitized_method_name}]&quot;
         end
 
         def tag_name_with_index(index)
-          &quot;#{@object_name}[#{index}][#{@method_name}]&quot;
+          &quot;#{@object_name}[#{index}][#{sanitized_method_name}]&quot;
         end
 
         def tag_id
-          &quot;#{sanitized_object_name}_#{@method_name}&quot;
+          &quot;#{sanitized_object_name}_#{sanitized_method_name}&quot;
         end
 
         def tag_id_with_index(index)
-          &quot;#{sanitized_object_name}_#{index}_#{@method_name}&quot;
+          &quot;#{sanitized_object_name}_#{index}_#{sanitized_method_name}&quot;
         end
 
         def sanitized_object_name
-          @object_name.gsub(/[^-a-zA-Z0-9:.]/, &quot;_&quot;).sub(/_$/, &quot;&quot;)
+          @sanitized_object_name ||= @object_name.gsub(/[^-a-zA-Z0-9:.]/, &quot;_&quot;).sub(/_$/, &quot;&quot;)
+        end
+
+        def sanitized_method_name
+          @sanitized_method_name ||= @method_name.sub(/\?$/,&quot;&quot;)
         end
     end
 </diff>
      <filename>actionpack/lib/action_view/helpers/form_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,7 @@ silence_warnings do
     alias_method :title_before_type_cast, :title unless respond_to?(:title_before_type_cast)
     alias_method :body_before_type_cast, :body unless respond_to?(:body_before_type_cast)
     alias_method :author_name_before_type_cast, :author_name unless respond_to?(:author_name_before_type_cast)
+    alias_method :secret?, :secret 
 
     def new_record=(boolean)
       @new_record = boolean
@@ -71,10 +72,12 @@ class FormHelperTest &lt; ActionView::TestCase
       '&lt;label class=&quot;title_label&quot; for=&quot;post_title&quot;&gt;Title&lt;/label&gt;',
       label(&quot;post&quot;, &quot;title&quot;, nil, :class =&gt; 'title_label')
     )
+    assert_dom_equal('&lt;label for=&quot;post_secret&quot;&gt;Secret?&lt;/label&gt;', label(&quot;post&quot;, &quot;secret?&quot;))
   end
 
   def test_label_with_symbols
     assert_dom_equal('&lt;label for=&quot;post_title&quot;&gt;Title&lt;/label&gt;', label(:post, :title))
+    assert_dom_equal('&lt;label for=&quot;post_secret&quot;&gt;Secret?&lt;/label&gt;', label(:post, :secret?))
   end
 
   def test_label_with_for_attribute_as_symbol
@@ -140,6 +143,8 @@ class FormHelperTest &lt; ActionView::TestCase
   def test_hidden_field
     assert_dom_equal '&lt;input id=&quot;post_title&quot; name=&quot;post[title]&quot; type=&quot;hidden&quot; value=&quot;Hello World&quot; /&gt;',
       hidden_field(&quot;post&quot;, &quot;title&quot;)
+      assert_dom_equal '&lt;input id=&quot;post_secret&quot; name=&quot;post[secret]&quot; type=&quot;hidden&quot; value=&quot;1&quot; /&gt;',
+        hidden_field(&quot;post&quot;, &quot;secret?&quot;)
   end
 
   def test_hidden_field_with_escapes
@@ -172,6 +177,10 @@ class FormHelperTest &lt; ActionView::TestCase
       '&lt;input checked=&quot;checked&quot; id=&quot;post_secret&quot; name=&quot;post[secret]&quot; type=&quot;checkbox&quot; value=&quot;1&quot; /&gt;&lt;input name=&quot;post[secret]&quot; type=&quot;hidden&quot; value=&quot;0&quot; /&gt;',
       check_box(&quot;post&quot;, &quot;secret&quot;)
     )
+    assert_dom_equal(
+      '&lt;input checked=&quot;checked&quot; id=&quot;post_secret&quot; name=&quot;post[secret]&quot; type=&quot;checkbox&quot; value=&quot;1&quot; /&gt;&lt;input name=&quot;post[secret]&quot; type=&quot;hidden&quot; value=&quot;0&quot; /&gt;',
+      check_box(&quot;post&quot;, &quot;secret?&quot;)
+    )
   end
 
   def test_check_box_with_explicit_checked_and_unchecked_values</diff>
      <filename>actionpack/test/template/form_helper_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>123e55686de920499cc8572f3a8b4d585d20ab02</id>
    </parent>
  </parents>
  <author>
    <name>Andrew Vit</name>
    <email>andrew@avit.ca</email>
  </author>
  <url>http://github.com/rails/rails/commit/04f52219f11944e50555dc59917c73c99581dac0</url>
  <id>04f52219f11944e50555dc59917c73c99581dac0</id>
  <committed-date>2008-05-06T00:03:32-07:00</committed-date>
  <authored-date>2008-05-05T12:45:09-07:00</authored-date>
  <message>Fixed form helper's name attribute for question methods</message>
  <tree>4f6ebcdc370ac5de6aba10c376630d2237af0c72</tree>
  <committer>
    <name>rick</name>
    <email>rick@spacemonkey.local</email>
  </committer>
</commit>
