<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: About Rails Checkboxes</title>
	<atom:link href="http://www.stupididea.com/2008/07/05/about-rails-checkboxes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stupididea.com/2008/07/05/about-rails-checkboxes/</link>
	<description></description>
	<pubDate>Tue, 06 Jan 2009 13:04:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Ed Spencer</title>
		<link>http://www.stupididea.com/2008/07/05/about-rails-checkboxes/#comment-165</link>
		<dc:creator>Ed Spencer</dc:creator>
		<pubDate>Fri, 24 Oct 2008 12:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.stupididea.com/?p=99#comment-165</guid>
		<description>@shawn

That's a pretty ridiculous point to make, unless:

a) You're on such a low bandwidth connection that a few hundred bytes of transfer causes noticeable delays (in which case certainly don't use Ext JS!)
b) You're paying for your bandwidth by the byte (again, don't use Ext JS)

Are you seriously suggesting that &#60;&#62; will have any noticeable impact on page load speed?  That string of text can be represented using 72 bytes, which will easily fit in a packet along with a lot more page data.  As a percentage of the size of the Ext JS library - which is of course required to even run the example - this comes to about 0.013%, depending on whether you load the full library or just cherry pick features to save bandwidth.

In any case this was a post about Rails checkboxes, and this is precisely how Rails expects checkbox data to arrive.

Nice post.  Buried deep in my todo list is to write a ux to allow this to be added in one component.  e.g.:

{
  xtype:      'rails_checkbox',
  fieldLabel: 'Field Name',
  name:       'model_name[field_name]'
}

Which would be equivalent to:

{
  xtype:      'checkbox',
  fieldLabel: 'Field Name',
  name:       'model_name[field_name]',
  inputValue: '1'
},
{
  xtype: 'hidden',
  name:  'model_name[field_name]',
  value: '0'
}</description>
		<content:encoded><![CDATA[<p>@shawn</p>
<p>That&#8217;s a pretty ridiculous point to make, unless:</p>
<p>a) You&#8217;re on such a low bandwidth connection that a few hundred bytes of transfer causes noticeable delays (in which case certainly don&#8217;t use Ext JS!)<br />
b) You&#8217;re paying for your bandwidth by the byte (again, don&#8217;t use Ext JS)</p>
<p>Are you seriously suggesting that &lt;&gt; will have any noticeable impact on page load speed?  That string of text can be represented using 72 bytes, which will easily fit in a packet along with a lot more page data.  As a percentage of the size of the Ext JS library - which is of course required to even run the example - this comes to about 0.013%, depending on whether you load the full library or just cherry pick features to save bandwidth.</p>
<p>In any case this was a post about Rails checkboxes, and this is precisely how Rails expects checkbox data to arrive.</p>
<p>Nice post.  Buried deep in my todo list is to write a ux to allow this to be added in one component.  e.g.:</p>
<p>{<br />
  xtype:      &#8216;rails_checkbox&#8217;,<br />
  fieldLabel: &#8216;Field Name&#8217;,<br />
  name:       &#8216;model_name[field_name]&#8216;<br />
}</p>
<p>Which would be equivalent to:</p>
<p>{<br />
  xtype:      &#8216;checkbox&#8217;,<br />
  fieldLabel: &#8216;Field Name&#8217;,<br />
  name:       &#8216;model_name[field_name]&#8216;,<br />
  inputValue: &#8216;1&#8242;<br />
},<br />
{<br />
  xtype: &#8216;hidden&#8217;,<br />
  name:  &#8216;model_name[field_name]&#8216;,<br />
  value: &#8216;0&#8242;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: method</title>
		<link>http://www.stupididea.com/2008/07/05/about-rails-checkboxes/#comment-140</link>
		<dc:creator>method</dc:creator>
		<pubDate>Mon, 14 Jul 2008 16:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.stupididea.com/?p=99#comment-140</guid>
		<description>I see your point, Shawn, but there are a lot worse ways to waste user's bandwidth (I'm pretty ashamed of the html + redundant javascript in my other post). I think the Rails guys felt they were "fixing" html form posting. Sending the "0" is sort of the equivalent of an onUnclick event. I admit that it's just pushing code around, though.</description>
		<content:encoded><![CDATA[<p>I see your point, Shawn, but there are a lot worse ways to waste user&#8217;s bandwidth (I&#8217;m pretty ashamed of the html + redundant javascript in my other post). I think the Rails guys felt they were &#8220;fixing&#8221; html form posting. Sending the &#8220;0&#8243; is sort of the equivalent of an onUnclick event. I admit that it&#8217;s just pushing code around, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shawn</title>
		<link>http://www.stupididea.com/2008/07/05/about-rails-checkboxes/#comment-139</link>
		<dc:creator>shawn</dc:creator>
		<pubDate>Sun, 13 Jul 2008 22:33:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.stupididea.com/?p=99#comment-139</guid>
		<description>thats hideous! They surly could have done something easier peoples bandwidth. If it can tell you and pass that zero only if the check-box has been interacted with then great but otherwise its just some bloat because people dont want to have to deal with it on the server side</description>
		<content:encoded><![CDATA[<p>thats hideous! They surly could have done something easier peoples bandwidth. If it can tell you and pass that zero only if the check-box has been interacted with then great but otherwise its just some bloat because people dont want to have to deal with it on the server side</p>
]]></content:encoded>
	</item>
</channel>
</rss>
