<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Yet Another Rails Newbie &#187; Uncategorized</title>
	<atom:link href="http://hittingthebuffers.wordpress.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://hittingthebuffers.wordpress.com</link>
	<description>Just another Wordpress.com weblog</description>
	<lastBuildDate>Fri, 07 Jul 2006 22:46:43 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='hittingthebuffers.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/22f121bedddce9eb72a97ce43cded59f?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Yet Another Rails Newbie &#187; Uncategorized</title>
		<link>http://hittingthebuffers.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hittingthebuffers.wordpress.com/osd.xml" title="Yet Another Rails Newbie" />
		<item>
		<title>We&#8217;re moving!</title>
		<link>http://hittingthebuffers.wordpress.com/2006/07/07/were-moving/</link>
		<comments>http://hittingthebuffers.wordpress.com/2006/07/07/were-moving/#comments</comments>
		<pubDate>Fri, 07 Jul 2006 22:46:43 +0000</pubDate>
		<dc:creator>hittingthebuffers</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://hittingthebuffers.wordpress.com/2006/07/07/were-moving/</guid>
		<description><![CDATA[This blog is moving soon. Most of the posts here have already been transferred over and new ones will only appear there.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hittingthebuffers.wordpress.com&blog=197703&post=12&subd=hittingthebuffers&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This blog is <a href="http://www.hittingthebuffers.com">moving</a> soon. Most of the posts here have already been transferred over and new ones will only appear there.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hittingthebuffers.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hittingthebuffers.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hittingthebuffers.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hittingthebuffers.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hittingthebuffers.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hittingthebuffers.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hittingthebuffers.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hittingthebuffers.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hittingthebuffers.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hittingthebuffers.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hittingthebuffers.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hittingthebuffers.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hittingthebuffers.wordpress.com&blog=197703&post=12&subd=hittingthebuffers&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hittingthebuffers.wordpress.com/2006/07/07/were-moving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc2deb08e3fa573867b250dd6b71d1a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">hittingthebuffers</media:title>
		</media:content>
	</item>
		<item>
		<title>New Newbie</title>
		<link>http://hittingthebuffers.wordpress.com/2006/06/04/gubbins/</link>
		<comments>http://hittingthebuffers.wordpress.com/2006/06/04/gubbins/#comments</comments>
		<pubDate>Sun, 04 Jun 2006 23:07:46 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://hittingthebuffers.wordpress.com/2006/06/04/gubbins/</guid>
		<description><![CDATA[Thanks to HittingTheBuffers who has let me post, I&#39;ll be adding my Rails findings and hopefully helping out anyone else who&#39;s just as stuck as me.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hittingthebuffers.wordpress.com&blog=197703&post=7&subd=hittingthebuffers&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Thanks to HittingTheBuffers who has let me post, I&#39;ll be adding my Rails findings and hopefully helping out anyone else who&#39;s just as stuck as me.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hittingthebuffers.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hittingthebuffers.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hittingthebuffers.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hittingthebuffers.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hittingthebuffers.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hittingthebuffers.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hittingthebuffers.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hittingthebuffers.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hittingthebuffers.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hittingthebuffers.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hittingthebuffers.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hittingthebuffers.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hittingthebuffers.wordpress.com&blog=197703&post=7&subd=hittingthebuffers&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hittingthebuffers.wordpress.com/2006/06/04/gubbins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc9b4eb2fe9793c5e3fd27c1db5a43a0?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Richard</media:title>
		</media:content>
	</item>
		<item>
		<title>has_one or belongs_to?</title>
		<link>http://hittingthebuffers.wordpress.com/2006/04/25/has_one-or-belongs_to/</link>
		<comments>http://hittingthebuffers.wordpress.com/2006/04/25/has_one-or-belongs_to/#comments</comments>
		<pubDate>Tue, 25 Apr 2006 09:38:03 +0000</pubDate>
		<dc:creator>hittingthebuffers</dc:creator>
				<category><![CDATA[ActiveRecord]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://hittingthebuffers.wordpress.com/2006/04/25/has_one-or-belongs_to/</guid>
		<description><![CDATA[One of the things that took a little more understanding than usual was the correct use of the ActiveRecord methods that define the relationships between your objects. I was often unsure whether to use has_one or belongs_to.
I have to write pub quizzes every so often. I had a quickly scaffolded together rails app to help [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hittingthebuffers.wordpress.com&blog=197703&post=4&subd=hittingthebuffers&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One of the things that took a little more understanding than usual was the correct use of the ActiveRecord methods that define the relationships between your objects. I was often unsure whether to use <code>has_one</code> or <code>belongs_to</code>.</p>
<p>I have to write pub quizzes every so often. I had a quickly scaffolded together rails app to help me write them but it lacked all but the most basic features. So, I started a new one. I realised that I needed three tables: quizzes, questions and categories. I wrote the migrations and tried to set up the relationships in the created models. When I tried to test what I’d written in <code>script/console</code>. I could create quizzes and add questions to them but not assign the questions to a category. This baffled me for a while.</p>
<p>After going off and doing something else for a while I came back to the code and the database diagram and realised my error. While I’d correctly said that a question belonged_to a quiz, I’d not done the same with the categories and had thought that a question had a category. Looking again at the database structure I realised that the relationships work like this: <strong>The table with the foreign key in it belongs_to the table that that foreign key references.</strong> In my case my questions table had a quiz_id and a category_id. Therefore a <code>Question</code> has a <code>belongs_to</code> relationship with both the <code>Quiz</code> and <code>Category</code> models which both in turn have <code>has_many</code> relationships with <code>Question</code>.</p>
<p>I made the changes and it works now. It’s always good when something clicks into place.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hittingthebuffers.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hittingthebuffers.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hittingthebuffers.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hittingthebuffers.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hittingthebuffers.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hittingthebuffers.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hittingthebuffers.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hittingthebuffers.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hittingthebuffers.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hittingthebuffers.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hittingthebuffers.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hittingthebuffers.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hittingthebuffers.wordpress.com&blog=197703&post=4&subd=hittingthebuffers&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hittingthebuffers.wordpress.com/2006/04/25/has_one-or-belongs_to/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc2deb08e3fa573867b250dd6b71d1a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">hittingthebuffers</media:title>
		</media:content>
	</item>
		<item>
		<title>What&#8217;s this all about then?</title>
		<link>http://hittingthebuffers.wordpress.com/2006/04/23/whats-this-all-about-then/</link>
		<comments>http://hittingthebuffers.wordpress.com/2006/04/23/whats-this-all-about-then/#comments</comments>
		<pubDate>Sun, 23 Apr 2006 11:15:29 +0000</pubDate>
		<dc:creator>hittingthebuffers</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://hittingthebuffers.wordpress.com/2006/04/23/whats-this-all-about-then/</guid>
		<description><![CDATA[Like a lot of web developers I heard about Rails last year and began to get interested it. Owning a Mac meant that it was fairly easy to get Rails installed and get up and running. Since then I’ve played with Rails but not written a full application yet. One of the problems I’ve encountered [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hittingthebuffers.wordpress.com&blog=197703&post=3&subd=hittingthebuffers&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Like a lot of web developers I heard about Rails last year and began to get interested it. Owning a Mac meant that it was fairly easy to get Rails installed and get up and running. Since then I’ve played with Rails but not written a full application yet. One of the problems I’ve encountered is the rather disparate nature of the documentation. So, the plan for this blog is to keep learning Rails and to document all of the useful links I find. </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hittingthebuffers.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hittingthebuffers.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hittingthebuffers.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hittingthebuffers.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hittingthebuffers.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hittingthebuffers.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hittingthebuffers.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hittingthebuffers.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hittingthebuffers.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hittingthebuffers.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hittingthebuffers.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hittingthebuffers.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hittingthebuffers.wordpress.com&blog=197703&post=3&subd=hittingthebuffers&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hittingthebuffers.wordpress.com/2006/04/23/whats-this-all-about-then/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc2deb08e3fa573867b250dd6b71d1a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">hittingthebuffers</media:title>
		</media:content>
	</item>
	</channel>
</rss>