<?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: Rails mistake of the day: validating a relationship before it&#8217;s created</title>
	<atom:link href="http://infovore.org/archives/2007/04/03/rails-mistake-of-the-day-validating-a-relationship-before-its-created/feed/" rel="self" type="application/rss+xml" />
	<link>http://infovore.org/archives/2007/04/03/rails-mistake-of-the-day-validating-a-relationship-before-its-created/</link>
	<description>a weblog by Tom Armitage</description>
	<lastBuildDate>Mon, 06 Feb 2012 22:42:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Tom</title>
		<link>http://infovore.org/archives/2007/04/03/rails-mistake-of-the-day-validating-a-relationship-before-its-created/comment-page-1/#comment-29719</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 04 Apr 2007 21:42:32 +0000</pubDate>
		<guid isPermaLink="false">http://infovore.org/archives/2007/04/03/rails-mistake-of-the-day-validating-a-relationship-before-its-created/#comment-29719</guid>
		<description>validates_presence_of :topic doesn&#039;t work either - same problem as with :topic_id, alas, as far as I can tell.

I&#039;m sure there&#039;s a numpty error at the heart of my problems, but I&#039;ve covered most bases by now...</description>
		<content:encoded><![CDATA[<p>validates_presence_of :topic doesn&#8217;t work either &#8211; same problem as with :topic_id, alas, as far as I can tell.</p>
<p>I&#8217;m sure there&#8217;s a numpty error at the heart of my problems, but I&#8217;ve covered most bases by now&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland</title>
		<link>http://infovore.org/archives/2007/04/03/rails-mistake-of-the-day-validating-a-relationship-before-its-created/comment-page-1/#comment-29717</link>
		<dc:creator>Roland</dc:creator>
		<pubDate>Wed, 04 Apr 2007 21:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://infovore.org/archives/2007/04/03/rails-mistake-of-the-day-validating-a-relationship-before-its-created/#comment-29717</guid>
		<description>Can you not do one of:

validates_presence_of :topic

(note - no _id)

or validates_associated :topic to check that the topic is in itself valid.

I haven&#039;t tried either of these, but I think they&#039;d work.</description>
		<content:encoded><![CDATA[<p>Can you not do one of:</p>
<p>validates_presence_of :topic</p>
<p>(note &#8211; no _id)</p>
<p>or validates_associated :topic to check that the topic is in itself valid.</p>
<p>I haven&#8217;t tried either of these, but I think they&#8217;d work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

