<?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: A Bit on Rails Partials</title>
	<atom:link href="http://addictedtonew.com/archives/149/a-bit-on-rails-partials/feed/" rel="self" type="application/rss+xml" />
	<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/</link>
	<description>John Nunemaker\'s thoughts and such</description>
	<lastBuildDate>Sun, 01 Nov 2009 17:19:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Joe</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-184070</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Mon, 18 May 2009 15:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-184070</guid>
		<description>Alright, but where are you defining &#039;single&#039;? :)</description>
		<content:encoded><![CDATA[<p>Alright, but where are you defining &#8217;single&#8217;? :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jnunemaker</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-181678</link>
		<dc:creator>jnunemaker</dc:creator>
		<pubDate>Wed, 29 Apr 2009 05:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-181678</guid>
		<description>They just need to be in a view directory. For example, _post.html.erb would most likely be in app/views/posts.</description>
		<content:encoded><![CDATA[<p>They just need to be in a view directory. For example, _post.html.erb would most likely be in app/views/posts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-181665</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Wed, 29 Apr 2009 03:37:44 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-181665</guid>
		<description>where do you PUT the partial.  its like every site has this information but no one tells you where to put the _*.erb file</description>
		<content:encoded><![CDATA[<p>where do you PUT the partial.  its like every site has this information but no one tells you where to put the _*.erb file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis Duhn</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-130751</link>
		<dc:creator>Curtis Duhn</dc:creator>
		<pubDate>Sat, 01 Mar 2008 05:40:39 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-130751</guid>
		<description>To make your CSS a little DRYer, you can space delimit multiple class names like &lt;div class=&quot;single post&quot;&gt;...&lt;/div&gt; instead of &lt;div class=&quot;single-post&quot;&gt;

Then in your CSS you can do

#  Style anything single (posts and non-posts) in a red box 
.single {
  border: solid thin red;
}

# Style all posts (single or collections) with a small font 
.post {
  font-size: small;
}

# Style single posts with a small blue font in a red box
.single.post {
  color: blue;
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>To make your CSS a little DRYer, you can space delimit multiple class names like &lt;div class=&#8221;single post&#8221;&gt;&#8230;&lt;/div&gt; instead of &lt;div class=&#8221;single-post&#8221;&gt;</p>
<p>Then in your CSS you can do</p>
<p>#  Style anything single (posts and non-posts) in a red box<br />
.single {<br />
  border: solid thin red;<br />
}</p>
<p># Style all posts (single or collections) with a small font<br />
.post {<br />
  font-size: small;<br />
}</p>
<p># Style single posts with a small blue font in a red box<br />
.single.post {<br />
  color: blue;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: k-dizzle</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-128211</link>
		<dc:creator>k-dizzle</dc:creator>
		<pubDate>Wed, 13 Feb 2008 18:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-128211</guid>
		<description>Awesome. Thanks!</description>
		<content:encoded><![CDATA[<p>Awesome. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akuma624</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-126545</link>
		<dc:creator>akuma624</dc:creator>
		<pubDate>Tue, 05 Feb 2008 21:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-126545</guid>
		<description>Did I miss something .... where was the setp to generate or create the _&quot;action name&quot; partial file?</description>
		<content:encoded><![CDATA[<p>Did I miss something &#8230;. where was the setp to generate or create the _&#8221;action name&#8221; partial file?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#187; Rails linkdump 2 &#124; monkinetic blog archive</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-67798</link>
		<dc:creator>&#187; Rails linkdump 2 &#124; monkinetic blog archive</dc:creator>
		<pubDate>Fri, 30 Mar 2007 20:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-67798</guid>
		<description>[...] A Bit on Rails Partials // Archives // Addicted To New [...]</description>
		<content:encoded><![CDATA[<p>[...] A Bit on Rails Partials // Archives // Addicted To New [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clint Pidlubny</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-1607</link>
		<dc:creator>Clint Pidlubny</dc:creator>
		<pubDate>Fri, 05 May 2006 13:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-1607</guid>
		<description>Yeah, I like using the &quot;body id=&quot; to style the same elements differently on each page. It&#039;s a great dry way of coding. Particularly useful for navigation and showing the user their nav selection. 

On topic: I love the use of looping through a collection in a partial. Nice write up John.</description>
		<content:encoded><![CDATA[<p>Yeah, I like using the &#8220;body id=&#8221; to style the same elements differently on each page. It&#8217;s a great dry way of coding. Particularly useful for navigation and showing the user their nav selection. </p>
<p>On topic: I love the use of looping through a collection in a partial. Nice write up John.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaime</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-1599</link>
		<dc:creator>Jaime</dc:creator>
		<pubDate>Thu, 04 May 2006 20:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-1599</guid>
		<description>That&#039;s true.  I just like to leave body ids for things like matching the current page to the highlighted item in the nav.  Since you can only apply one ID per page, but can apply multiple classes, I thought a body class might work better in this case.</description>
		<content:encoded><![CDATA[<p>That&#8217;s true.  I just like to leave body ids for things like matching the current page to the highlighted item in the nav.  Since you can only apply one ID per page, but can apply multiple classes, I thought a body class might work better in this case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Nunemaker</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-1598</link>
		<dc:creator>John Nunemaker</dc:creator>
		<pubDate>Thu, 04 May 2006 19:58:19 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-1598</guid>
		<description>@Jaime - Body selectors would work perfectly fine. I would probably use id&#039;s as opposed to a class because they will be a unique element that will only change page to page.</description>
		<content:encoded><![CDATA[<p>@Jaime &#8211; Body selectors would work perfectly fine. I would probably use id&#8217;s as opposed to a class because they will be a unique element that will only change page to page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaime</title>
		<link>http://addictedtonew.com/archives/149/a-bit-on-rails-partials/comment-page-1/#comment-1597</link>
		<dc:creator>Jaime</dc:creator>
		<pubDate>Thu, 04 May 2006 19:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://addictedtonew.com/archives/149/a-bit-on-rails-partials/#comment-1597</guid>
		<description>What about using more specific selectors so that you don&#039;t have to apply a class to the post.  For example, on the single post page, you would apply a the &quot;single&quot; class to the body of the page (and &quot;post&quot; class to the post div), and then &quot;body.single div.post&quot; to select your post element  in the CSS.  And then apply a &quot;multi&quot; class to the body of the page with multiple posts, and then &quot;body.multi div.post&quot; to select the element in CSS.

This leaves the logic out of the presentation layer.

All that said, yours is still a good tip that could be put to good use.</description>
		<content:encoded><![CDATA[<p>What about using more specific selectors so that you don&#8217;t have to apply a class to the post.  For example, on the single post page, you would apply a the &#8220;single&#8221; class to the body of the page (and &#8220;post&#8221; class to the post div), and then &#8220;body.single div.post&#8221; to select your post element  in the CSS.  And then apply a &#8220;multi&#8221; class to the body of the page with multiple posts, and then &#8220;body.multi div.post&#8221; to select the element in CSS.</p>
<p>This leaves the logic out of the presentation layer.</p>
<p>All that said, yours is still a good tip that could be put to good use.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

