<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer" nil="true"></assigned-user-id>
  <attachments-count type="integer">1</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-08-09T08:40:45+01:00</created-at>
  <creator-id type="integer">23734</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer">9903</milestone-id>
  <number type="integer">789</number>
  <permalink>checkbox-generation-with-false</permalink>
  <priority type="integer">250</priority>
  <project-id type="integer">8994</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>resolved</state>
  <tag>actionpack helper patch</tag>
  <title>checkbox generation with &quot;false&quot;</title>
  <updated-at type="datetime">2008-11-22T19:45:58+00:00</updated-at>
  <user-id type="integer">424</user-id>
  <user-name>Joshua Peek</user-name>
  <creator-name>Senthil</creator-name>
  <url>http://rails.lighthouseapp.com/projects/8994/tickets/789</url>
  <milestone-title>2.x</milestone-title>
  <original-body>while migrating one large app I noticed the check_box helper is inconsistent when compared to radio button helper

I have written test and minor fix which solves this problem.

 def test_check_box_true_false
   actual = check_box_tag &quot;admin&quot;,true
   expected = %(&lt;input id=&quot;admin&quot; name=&quot;admin&quot; type=&quot;checkbox&quot; value=&quot;true&quot; /&gt;)
   assert_dom_equal expected, actual #passes
   actual = check_box_tag &quot;admin&quot;,false
   expected = %(&lt;input id=&quot;admin&quot; name=&quot;admin&quot; type=&quot;checkbox&quot; value=&quot;false&quot; /&gt;)
   assert_dom_equal expected, actual #fails
 end

attaching the git commit as diff

you can also access it from, my fork
git://github.com/railsfactory/rails.git</original-body>
  <latest-body>while migrating one large app I noticed the check_box helper is inconsistent when compared to radio button helper

I have written test and minor fix which solves this problem.

 def test_check_box_true_false
   actual = check_box_tag &quot;admin&quot;,true
   expected = %(&lt;input id=&quot;admin&quot; name=&quot;admin&quot; type=&quot;checkbox&quot; value=&quot;true&quot; /&gt;)
   assert_dom_equal expected, actual #passes
   actual = check_box_tag &quot;admin&quot;,false
   expected = %(&lt;input id=&quot;admin&quot; name=&quot;admin&quot; type=&quot;checkbox&quot; value=&quot;false&quot; /&gt;)
   assert_dom_equal expected, actual #fails
 end

attaching the git commit as diff

you can also access it from, my fork
git://github.com/railsfactory/rails.git</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;while migrating one large app I noticed the check_box helper is inconsistent when compared to radio button helper&lt;/p&gt;

&lt;p&gt;I have written test and minor fix which solves this problem.&lt;/p&gt;

&lt;p&gt; def test_check_box_true_false
   actual = check_box_tag &quot;admin&quot;,true
   expected = %()
   assert_dom_equal expected, actual #passes
   actual = check_box_tag &quot;admin&quot;,false
   expected = %()
   assert_dom_equal expected, actual #fails
 end&lt;/p&gt;

&lt;p&gt;attaching the git commit as diff&lt;/p&gt;

&lt;p&gt;you can also access it from, my fork
git://github.com/railsfactory/rails.git&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>while migrating one large app I noticed the check_box helper is inconsistent when compared to radio button helper

I have written test and minor fix which solves this problem.

 def test_check_box_true_false
   actual = check_box_tag &quot;admin&quot;,true
   expected = %(&lt;input id=&quot;admin&quot; name=&quot;admin&quot; type=&quot;checkbox&quot; value=&quot;true&quot; /&gt;)
   assert_dom_equal expected, actual #passes
   actual = check_box_tag &quot;admin&quot;,false
   expected = %(&lt;input id=&quot;admin&quot; name=&quot;admin&quot; type=&quot;checkbox&quot; value=&quot;false&quot; /&gt;)
   assert_dom_equal expected, actual #fails
 end

attaching the git commit as diff

you can also access it from, my fork
git://github.com/railsfactory/rails.git</body>
      <body-html>&lt;div&gt;&lt;p&gt;while migrating one large app I noticed the check_box helper is inconsistent when compared to radio button helper&lt;/p&gt;

&lt;p&gt;I have written test and minor fix which solves this problem.&lt;/p&gt;

&lt;p&gt; def test_check_box_true_false
   actual = check_box_tag &quot;admin&quot;,true
   expected = %()
   assert_dom_equal expected, actual #passes
   actual = check_box_tag &quot;admin&quot;,false
   expected = %()
   assert_dom_equal expected, actual #fails
 end&lt;/p&gt;

&lt;p&gt;attaching the git commit as diff&lt;/p&gt;

&lt;p&gt;you can also access it from, my fork
git://github.com/railsfactory/rails.git&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-08-09T08:40:46+01:00</created-at>
      <creator-id type="integer">23734</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">789</number>
      <permalink>checkbox-generation-with-false</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>actionpack helper</tag>
      <title>checkbox generation with &quot;false&quot;</title>
      <updated-at type="datetime">2008-08-09T08:40:46+01:00</updated-at>
      <user-id type="integer">23734</user-id>
      <user-name>Senthil</user-name>
      <creator-name>Senthil</creator-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/789</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>diff</body>
      <body-html>&lt;div&gt;&lt;p&gt;diff&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-08-09T16:41:24+01:00</created-at>
      <creator-id type="integer">23734</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">789</number>
      <permalink>checkbox-generation-with-false</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>actionpack helper</tag>
      <title>checkbox generation with &quot;false&quot;</title>
      <updated-at type="datetime">2008-08-09T16:41:24+01:00</updated-at>
      <user-id type="integer">23734</user-id>
      <user-name>Senthil</user-name>
      <creator-name>Senthil</creator-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/789</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>tests pass</body>
      <body-html>&lt;div&gt;&lt;p&gt;tests pass&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-22T19:45:54+00:00</created-at>
      <creator-id type="integer">23734</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: actionpack helper
:state: new
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">789</number>
      <permalink>checkbox-generation-with-false</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>resolved</state>
      <tag>actionpack helper patch</tag>
      <title>checkbox generation with &quot;false&quot;</title>
      <updated-at type="datetime">2008-11-22T19:45:58+00:00</updated-at>
      <user-id type="integer">424</user-id>
      <user-name>Joshua Peek</user-name>
      <creator-name>Senthil</creator-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/789</url>
      <milestone-title>2.x</milestone-title>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>8824acdcd66409c073fbd3ba7a811df9840e16dc</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2008-08-09T08:40:45+01:00</created-at>
      <filename>helper_check_box_false_fix.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">38123</id>
      <size type="integer">3598</size>
      <uploader-id type="integer">23734</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/38123/helper_check_box_false_fix.diff</url>
    </attachment>
  </attachments>
</ticket>
