<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<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>
	<lastBuildDate>Mon, 02 Aug 2010 14:37:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Ed Spencer</title>
		<link>http://www.stupididea.com/2008/07/05/about-rails-checkboxes/comment-page-1/#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&#039;s a pretty ridiculous point to make, unless:

a) You&#039;re on such a low bandwidth connection that a few hundred bytes of transfer causes noticeable delays (in which case certainly don&#039;t use Ext JS!)
b) You&#039;re paying for your bandwidth by the byte (again, don&#039;t use Ext JS)

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.

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:      &#039;rails_checkbox&#039;,
  fieldLabel: &#039;Field Name&#039;,
  name:       &#039;model_name[field_name]&#039;
}

Which would be equivalent to:

{
  xtype:      &#039;checkbox&#039;,
  fieldLabel: &#039;Field Name&#039;,
  name:       &#039;model_name[field_name]&#039;,
  inputValue: &#039;1&#039;
},
{
  xtype: &#039;hidden&#039;,
  name:  &#039;model_name[field_name]&#039;,
  value: &#039;0&#039;
}</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 &#8211; which is of course required to even run the example &#8211; 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: &#8217;1&#8242;<br />
},<br />
{<br />
  xtype: &#8216;hidden&#8217;,<br />
  name:  &#8216;model_name[field_name]&#8216;,<br />
  value: &#8217;0&#8242;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: method</title>
		<link>http://www.stupididea.com/2008/07/05/about-rails-checkboxes/comment-page-1/#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&#039;s bandwidth (I&#039;m pretty ashamed of the html + redundant javascript in my other post). I think the Rails guys felt they were &quot;fixing&quot; html form posting. Sending the &quot;0&quot; is sort of the equivalent of an onUnclick event. I admit that it&#039;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-page-1/#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>
