<?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 for blog.layer2.org</title>
	<atom:link href="http://blog.layer2.org/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.layer2.org</link>
	<description>A technical blog</description>
	<pubDate>Thu, 24 Jul 2008 02:47:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Comment on Rails migration with a list of all United States by solipsistic</title>
		<link>http://blog.layer2.org/2008/01/12/rails-migration-with-a-list-of-all-united-states/#comment-178</link>
		<dc:creator>solipsistic</dc:creator>
		<pubDate>Wed, 18 Jun 2008 02:39:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2008/01/12/rails-migration-with-a-list-of-all-united-states/#comment-178</guid>
		<description>@kasey: Yeah, I guess running the command 

ruby script/generate model State

would make more sense instead of just creating the migration. In other words, you do need a State model.</description>
		<content:encoded><![CDATA[<p>@kasey: Yeah, I guess running the command </p>
<p>ruby script/generate model State</p>
<p>would make more sense instead of just creating the migration. In other words, you do need a State model.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails migration with a list of all United States by kasey</title>
		<link>http://blog.layer2.org/2008/01/12/rails-migration-with-a-list-of-all-united-states/#comment-177</link>
		<dc:creator>kasey</dc:creator>
		<pubDate>Tue, 17 Jun 2008 18:44:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2008/01/12/rails-migration-with-a-list-of-all-united-states/#comment-177</guid>
		<description>did you have to create a state model for this to work?

i keep getting this:

rake aborted!
uninitialized constant CreateStates::State
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:492:in `const_missing'</description>
		<content:encoded><![CDATA[<p>did you have to create a state model for this to work?</p>
<p>i keep getting this:</p>
<p>rake aborted!<br />
uninitialized constant CreateStates::State<br />
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:492:in `const_missing&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Remember Basic Authentication passwords in Firefox without Roboform by Free Form Filling So</title>
		<link>http://blog.layer2.org/2008/02/09/remember-basic-authentication-passwords-in-firefox-without-roboform/#comment-176</link>
		<dc:creator>Free Form Filling So</dc:creator>
		<pubDate>Fri, 09 May 2008 01:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2008/02/09/remember-basic-authentication-passwords-in-firefox-without-roboform/#comment-176</guid>
		<description>I have been using Roboform for a year now. I love the program, and don't know what I would do without it. I would recommend  it. I made a quick video about the program and posted it on squidoo</description>
		<content:encoded><![CDATA[<p>I have been using Roboform for a year now. I love the program, and don&#8217;t know what I would do without it. I would recommend  it. I made a quick video about the program and posted it on squidoo</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails migration with a list of all United States by James</title>
		<link>http://blog.layer2.org/2008/01/12/rails-migration-with-a-list-of-all-united-states/#comment-175</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 02 May 2008 14:31:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2008/01/12/rails-migration-with-a-list-of-all-united-states/#comment-175</guid>
		<description>Yet another great case of "Ask google and you shall receive".  

Thanks for the state list :)</description>
		<content:encoded><![CDATA[<p>Yet another great case of &#8220;Ask google and you shall receive&#8221;.  </p>
<p>Thanks for the state list <img src='http://blog.layer2.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on There is a reason mitsubishisucks.com exists by CW</title>
		<link>http://blog.layer2.org/2007/09/24/there-is-a-reason-mitsubishisuckscom-exists/#comment-174</link>
		<dc:creator>CW</dc:creator>
		<pubDate>Wed, 30 Apr 2008 19:20:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2007/09/24/there-is-a-reason-mitsubishisuckscom-exists/#comment-174</guid>
		<description>Ok so my heater has now failed as well!  And my engine idles very hard!  Thanks for the info!</description>
		<content:encoded><![CDATA[<p>Ok so my heater has now failed as well!  And my engine idles very hard!  Thanks for the info!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on There is a reason mitsubishisucks.com exists by mark harrington</title>
		<link>http://blog.layer2.org/2007/09/24/there-is-a-reason-mitsubishisuckscom-exists/#comment-173</link>
		<dc:creator>mark harrington</dc:creator>
		<pubDate>Wed, 30 Apr 2008 11:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2007/09/24/there-is-a-reason-mitsubishisuckscom-exists/#comment-173</guid>
		<description>I've been having a helluva time getting Mitsubishi to do anything more than profusely apologize for my defective paint before politely saying it's not covered under warranty. I'm still paying off this clunker (second owner) but the paint gets worse every day. Why hasn't the Federal Trade Commission or state Attorneys General looked into this problem, which appears to be affecting cars across North America?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been having a helluva time getting Mitsubishi to do anything more than profusely apologize for my defective paint before politely saying it&#8217;s not covered under warranty. I&#8217;m still paying off this clunker (second owner) but the paint gets worse every day. Why hasn&#8217;t the Federal Trade Commission or state Attorneys General looked into this problem, which appears to be affecting cars across North America?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Automatic updates in Debian Linux (etch) by zertyz</title>
		<link>http://blog.layer2.org/2007/09/25/automatic-updates-in-debian-linux-etch/#comment-172</link>
		<dc:creator>zertyz</dc:creator>
		<pubDate>Fri, 18 Apr 2008 17:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2007/09/25/automatic-updates-in-debian-linux-etch/#comment-172</guid>
		<description>Hey pal, I found your site when I was searching for a possible issue with automatic updates on etch causing me trouble.

...

Man, if you are not using those boxes, give me a password so I will put useful services on it :)

thanks</description>
		<content:encoded><![CDATA[<p>Hey pal, I found your site when I was searching for a possible issue with automatic updates on etch causing me trouble.</p>
<p>&#8230;</p>
<p>Man, if you are not using those boxes, give me a password so I will put useful services on it <img src='http://blog.layer2.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Convert has_and_belongs_to_many to a has_many :through association by adam smith</title>
		<link>http://blog.layer2.org/2007/10/10/convert-has_and_belongs_to_many-to-a-has_many-through-association/#comment-170</link>
		<dc:creator>adam smith</dc:creator>
		<pubDate>Fri, 11 Apr 2008 00:25:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2007/10/10/convert-has_and_belongs_to_many-to-a-has_many-through-association/#comment-170</guid>
		<description>Here is the follow-up I promised:
  http://www.stonemind.net/blog/2008/04/10/a-potential-confusion-when-converting-habtm-relationships-to-has_many-through/</description>
		<content:encoded><![CDATA[<p>Here is the follow-up I promised:<br />
  <a href="http://www.stonemind.net/blog/2008/04/10/a-potential-confusion-when-converting-habtm-relationships-to-has_many-through/" rel="nofollow">http://www.stonemind.net/blog/2008/04/10/a-potential-confusion-when-converting-habtm-relationships-to-has_many-through/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails&#8217; attachment_fu, :thumbnail_class and you by Liam</title>
		<link>http://blog.layer2.org/2007/11/19/rails-attachment_fu-thumbnail_class-and-you/#comment-169</link>
		<dc:creator>Liam</dc:creator>
		<pubDate>Thu, 10 Apr 2008 21:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2007/11/19/rails-attachment_fu-thumbnail_class-and-you/#comment-169</guid>
		<description>Thanks for your quick response.

In my Thumbnail model I included belongs_to :person and in my Person model I had both has_one :photo and has_one :thumbnail. I got ride of belongs_to :person (in Thumbnail model) and got rid of has_one :thumbnail (in Person model) restarted the server and your example worked.

Given that I only have 1 Thumbnail per Photo I only need to do:
p.photo.thumbnails</description>
		<content:encoded><![CDATA[<p>Thanks for your quick response.</p>
<p>In my Thumbnail model I included belongs_to :person and in my Person model I had both has_one :photo and has_one :thumbnail. I got ride of belongs_to :person (in Thumbnail model) and got rid of has_one :thumbnail (in Person model) restarted the server and your example worked.</p>
<p>Given that I only have 1 Thumbnail per Photo I only need to do:<br />
p.photo.thumbnails</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails&#8217; attachment_fu, :thumbnail_class and you by solipsistic</title>
		<link>http://blog.layer2.org/2007/11/19/rails-attachment_fu-thumbnail_class-and-you/#comment-168</link>
		<dc:creator>solipsistic</dc:creator>
		<pubDate>Thu, 10 Apr 2008 03:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.layer2.org/2007/11/19/rails-attachment_fu-thumbnail_class-and-you/#comment-168</guid>
		<description>@Liam

I'm not sure why your photos aren't showing thumbnails. Mine work fine. Maybe you could describe exactly what you mean by "does not work" ? Error? Empty set?

I do the same thing you're trying to accomplish with your Person model, except mine is called User. I do something like

&lt;pre&gt;
u = User.find 1
u.photos.first.thumbnails.first
&lt;/pre&gt;

using 

&lt;pre&gt;
class User
  has_many :photos
end

class Photo
  belongs_to :user
end
&lt;/pre&gt;

to give me the thumbnail. It sounds like you only have one Photo per Person, so you could probably do something like

&lt;pre&gt;
p = Person.find 1
p.photo.thumbnails.first
&lt;/pre&gt;

Do a 

&lt;pre&gt;
class Person
  def thumbnail
    thumbnails.first
  end
end
&lt;/pre&gt;

to make your life a bit easier and allow

&lt;pre&gt;
p = Person.find 1
p.photo.thumbnail
&lt;/pre&gt;

This is, of course, assuming you want only one Thumbnail per Photo.</description>
		<content:encoded><![CDATA[<p>@Liam</p>
<p>I&#8217;m not sure why your photos aren&#8217;t showing thumbnails. Mine work fine. Maybe you could describe exactly what you mean by &#8220;does not work&#8221; ? Error? Empty set?</p>
<p>I do the same thing you&#8217;re trying to accomplish with your Person model, except mine is called User. I do something like</p>
<pre>
u = User.find 1
u.photos.first.thumbnails.first
</pre>
<p>using </p>
<pre>
class User
  has_many :photos
end

class Photo
  belongs_to :user
end
</pre>
<p>to give me the thumbnail. It sounds like you only have one Photo per Person, so you could probably do something like</p>
<pre>
p = Person.find 1
p.photo.thumbnails.first
</pre>
<p>Do a </p>
<pre>
class Person
  def thumbnail
    thumbnails.first
  end
end
</pre>
<p>to make your life a bit easier and allow</p>
<pre>
p = Person.find 1
p.photo.thumbnail
</pre>
<p>This is, of course, assuming you want only one Thumbnail per Photo.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.831 seconds -->
