<?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: Block Helpers and DRY Views in Rails</title>
	<atom:link href="http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Tue, 16 Mar 2010 13:36:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cbmeeks</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-224593</link>
		<dc:creator>cbmeeks</dc:creator>
		<pubDate>Sat, 28 Nov 2009 03:02:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-224593</guid>
		<description>Great tips!</description>
		<content:encoded><![CDATA[<p>Great tips!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Stone</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-222842</link>
		<dc:creator>Mike Stone</dc:creator>
		<pubDate>Fri, 06 Nov 2009 06:13:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-222842</guid>
		<description>Check out a post I just published about a similar idea to make partials even easier and more readable:

&lt;a href="http://smellsblue.blogspot.com/2009/11/easy-partials-in-rails.html" rel="nofollow"&gt;http://smellsblue.blogspot.com/2009/11/easy-partials-in-rails.html&lt;/a&gt;

Would love to hear what you think!</description>
		<content:encoded><![CDATA[<p>Check out a post I just published about a similar idea to make partials even easier and more readable:</p>
<p><a href="http://smellsblue.blogspot.com/2009/11/easy-partials-in-rails.html" rel="nofollow">http://smellsblue.blogspot.com/2009/11/easy-partials-in-rails.html</a></p>
<p>Would love to hear what you think!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-199550</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Wed, 17 Jun 2009 02:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-199550</guid>
		<description>Jonathan: Haven't played with nested blocks, but as a guess, if it doesn't work it may have something to do with scoping and being unable to find the nested block's definition. Something you could look into...</description>
		<content:encoded><![CDATA[<p>Jonathan: Haven&#8217;t played with nested blocks, but as a guess, if it doesn&#8217;t work it may have something to do with scoping and being unable to find the nested block&#8217;s definition. Something you could look into&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Rochkind</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-198033</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Tue, 09 Jun 2009 05:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-198033</guid>
		<description>Back to the idea of having a partial-with-block call another partial-with-block, from a year ago.... It might be a 'smell', but I think it's sometimes appropriate. 

I've got a container, analagous to rounded corners implemented as a partial-with-block.  Then I've got another partial-with-block that implements the idea of a title that can be clicked to use js to show/hide content under it (with suitable user clues, and suitable non-js degrading). 

This seems an appropriate use for a partial with a block in both cases. And it doesn't seem odd to sometimes want a title-with-expandable-content inside a container eg rounded-corners, does it?

Yet, I'm having trouble making it work with Rails. Using either this hack OR the Rails 2 partial-layout trick. I'm using Rails 2.1.x, I think this stuff changed yet further in Rails 2.3.x, so figuring out how to do it in a way that will be forwards-compatible when I get my app migrated to 2.3 is even more of a pain.</description>
		<content:encoded><![CDATA[<p>Back to the idea of having a partial-with-block call another partial-with-block, from a year ago&#8230;. It might be a &#8217;smell&#8217;, but I think it&#8217;s sometimes appropriate. </p>
<p>I&#8217;ve got a container, analagous to rounded corners implemented as a partial-with-block.  Then I&#8217;ve got another partial-with-block that implements the idea of a title that can be clicked to use js to show/hide content under it (with suitable user clues, and suitable non-js degrading). </p>
<p>This seems an appropriate use for a partial with a block in both cases. And it doesn&#8217;t seem odd to sometimes want a title-with-expandable-content inside a container eg rounded-corners, does it?</p>
<p>Yet, I&#8217;m having trouble making it work with Rails. Using either this hack OR the Rails 2 partial-layout trick. I&#8217;m using Rails 2.1.x, I think this stuff changed yet further in Rails 2.3.x, so figuring out how to do it in a way that will be forwards-compatible when I get my app migrated to 2.3 is even more of a pain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton Jenkins</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-176410</link>
		<dc:creator>Anton Jenkins</dc:creator>
		<pubDate>Thu, 12 Mar 2009 08:40:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-176410</guid>
		<description>Awesome tip! Thanks for sharing.

I also really like the look of the :layout option when rendering partials as that seems even simpler, plus it's built in to the framework. Somehow that one seems to have passed me by. Thanks for passing it on Kornelis!</description>
		<content:encoded><![CDATA[<p>Awesome tip! Thanks for sharing.</p>
<p>I also really like the look of the :layout option when rendering partials as that seems even simpler, plus it&#8217;s built in to the framework. Somehow that one seems to have passed me by. Thanks for passing it on Kornelis!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-161488</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 19 Jan 2009 15:06:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-161488</guid>
		<description>Zing, it's true that divs and tables are both used incorrectly, but it's not fair to imply that they are as bad as one another.

When you put content in a table, you are implying that it is tabular data, like a spreadsheet - and when that isn't true, you are actively misrepresenting the content. You are saying it is one thing, when really it's another.

Whereas, when you use a div, you are simply failing to use a more semantically sound element - saying it is nothing when really it is something - which is a lesser crime, even if it remains a crime.</description>
		<content:encoded><![CDATA[<p>Zing, it&#8217;s true that divs and tables are both used incorrectly, but it&#8217;s not fair to imply that they are as bad as one another.</p>
<p>When you put content in a table, you are implying that it is tabular data, like a spreadsheet - and when that isn&#8217;t true, you are actively misrepresenting the content. You are saying it is one thing, when really it&#8217;s another.</p>
<p>Whereas, when you use a div, you are simply failing to use a more semantically sound element - saying it is nothing when really it is something - which is a lesser crime, even if it remains a crime.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Nesbitt</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-160767</link>
		<dc:creator>Josh Nesbitt</dc:creator>
		<pubDate>Thu, 15 Jan 2009 17:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-160767</guid>
		<description>Thanks a lot for this, have wondered how to do this for a while. Its made its way into a fair few of my projects as it is the most elegant solution to many cluttered HTML views.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this, have wondered how to do this for a while. Its made its way into a fair few of my projects as it is the most elegant solution to many cluttered HTML views.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zing</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-159046</link>
		<dc:creator>Zing</dc:creator>
		<pubDate>Sat, 10 Jan 2009 07:28:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-159046</guid>
		<description>What I'm really saying is that this isn't solving a problem we all have, it's solving a problem caused by the page author in not using markup correctly in the first place.

Sound harsh?  I'm sure it is.  But too many people have been using markup incorrectly since the beginning.  In the 1990s that was people using tables to position text.  Now it's people nesting 9,001 levels of divs to do the same thing (in this example it's just 4, but the number which are actually needed is 1!)  *Both* approaches are wrong, people need to wake up from the dream that merely replacing table with div is some kind of magic bullet.</description>
		<content:encoded><![CDATA[<p>What I&#8217;m really saying is that this isn&#8217;t solving a problem we all have, it&#8217;s solving a problem caused by the page author in not using markup correctly in the first place.</p>
<p>Sound harsh?  I&#8217;m sure it is.  But too many people have been using markup incorrectly since the beginning.  In the 1990s that was people using tables to position text.  Now it&#8217;s people nesting 9,001 levels of divs to do the same thing (in this example it&#8217;s just 4, but the number which are actually needed is 1!)  *Both* approaches are wrong, people need to wake up from the dream that merely replacing table with div is some kind of magic bullet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-135208</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Fri, 26 Sep 2008 01:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-135208</guid>
		<description>Jonathan, you could extend it to work with nested blocks, but personally I think it's a smell indicating a need for some refactoring.</description>
		<content:encoded><![CDATA[<p>Jonathan, you could extend it to work with nested blocks, but personally I think it&#8217;s a smell indicating a need for some refactoring.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Rochkind</title>
		<link>http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/comment-page-1/#comment-134301</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Tue, 23 Sep 2008 17:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/03/15/block-helpers-and-dry-views-in-rails/#comment-134301</guid>
		<description>This method doesn't seem to work when you want to have a partial-with-block itself call _another_ partial-with-block. 

Any advice?</description>
		<content:encoded><![CDATA[<p>This method doesn&#8217;t seem to work when you want to have a partial-with-block itself call _another_ partial-with-block. </p>
<p>Any advice?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
