<?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: Fields_for and Multiple Checkboxes</title>
	<atom:link href="http://blog.thatsuseful.com/2008/05/23/fields_for-and-multiple-checkboxes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thatsuseful.com/2008/05/23/fields_for-and-multiple-checkboxes/</link>
	<description>Life on and off the Rails</description>
	<lastBuildDate>Wed, 20 Aug 2008 17:47:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: eliguh</title>
		<link>http://blog.thatsuseful.com/2008/05/23/fields_for-and-multiple-checkboxes/comment-page-1/#comment-594</link>
		<dc:creator>eliguh</dc:creator>
		<pubDate>Fri, 23 May 2008 09:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caronsoftware.com/2008/05/23/fields_for-and-multiple-checkboxes#comment-594</guid>
		<description>this is my workaround:

&lt;% form.fields_for :foo_ids do &#124;f&#124; %&gt;
  &lt;% @foos.each do &#124;foo&#124; %&gt;
    &lt;%= f.check_box [], {:checked=&gt;...}, foo.id, nil %&gt;
  &lt;% end %&gt;
&lt;% end %&gt;

The magic lies in that nil. It makes the hidden checkboxes deliver &quot;&quot; instead of &quot;0&quot;, which is ignored in the controller.</description>
		<content:encoded><![CDATA[<p>this is my workaround:</p>
<p>&lt;% form.fields_for :foo_ids do |f| %&gt;<br />
  &lt;% @foos.each do |foo| %&gt;<br />
    &lt;%= f.check_box [], {:checked=&gt;&#8230;}, foo.id, nil %&gt;<br />
  &lt;% end %&gt;<br />
&lt;% end %&gt;</p>
<p>The magic lies in that nil. It makes the hidden checkboxes deliver &quot;&quot; instead of &quot;0&quot;, which is ignored in the controller.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Rutherford</title>
		<link>http://blog.thatsuseful.com/2008/05/23/fields_for-and-multiple-checkboxes/comment-page-1/#comment-595</link>
		<dc:creator>Scott Rutherford</dc:creator>
		<pubDate>Fri, 23 May 2008 09:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caronsoftware.com/2008/05/23/fields_for-and-multiple-checkboxes#comment-595</guid>
		<description>@eliguh - cool, thanks for sharing.</description>
		<content:encoded><![CDATA[<p>@eliguh &#8211; cool, thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenny Vargas</title>
		<link>http://blog.thatsuseful.com/2008/05/23/fields_for-and-multiple-checkboxes/comment-page-1/#comment-596</link>
		<dc:creator>Kenny Vargas</dc:creator>
		<pubDate>Fri, 23 May 2008 09:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caronsoftware.com/2008/05/23/fields_for-and-multiple-checkboxes#comment-596</guid>
		<description>pcvbgy7z7ytt3270</description>
		<content:encoded><![CDATA[<p>pcvbgy7z7ytt3270</p>
]]></content:encoded>
	</item>
</channel>
</rss>
