<?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: Multiple scopes with validates_uniqueness_of in Rails</title>
	<atom:link href="http://emergent.urbanpug.com/?feed=rss2&#038;p=72" rel="self" type="application/rss+xml" />
	<link>http://emergent.urbanpug.com/?p=72</link>
	<description>Order from disorder - Thoughts about where technology is going.</description>
	<lastBuildDate>Tue, 10 Mar 2015 22:09:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>By: Cameron</title>
		<link>http://emergent.urbanpug.com/?p=72&#038;cpage=1#comment-18553</link>
		<dc:creator><![CDATA[Cameron]]></dc:creator>
		<pubDate>Fri, 28 Dec 2007 05:52:49 +0000</pubDate>
		<guid isPermaLink="false">http://emergent.urbanpug.com/?p=72#comment-18553</guid>
		<description><![CDATA[I think that using validates_uniqueness_of :widget_id, :scope =&gt; [ :size, :store_id ] works just fine -- but it seems to fail silently. Creating the validate_on_create function as you are showing would at least raise an error message.]]></description>
		<content:encoded><![CDATA[<p>I think that using validates_uniqueness_of :widget_id, :scope =&gt; [ :size, :store_id ] works just fine &#8212; but it seems to fail silently. Creating the validate_on_create function as you are showing would at least raise an error message.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Grimm</title>
		<link>http://emergent.urbanpug.com/?p=72&#038;cpage=1#comment-14271</link>
		<dc:creator><![CDATA[Andrew Grimm]]></dc:creator>
		<pubDate>Sun, 14 Oct 2007 05:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://emergent.urbanpug.com/?p=72#comment-14271</guid>
		<description><![CDATA[After spending an hour or so googling for an answer, I decided to just try the equivalent of

&lt;code&gt;
validates_uniqueness_of :widget_id, :scope =&gt; [:store_id, :size]
validates_uniqueness_of :store_id, :scope =&gt; [:widget_id, :size]
validates_uniqueness_of :size, :scope =&gt; [:store_id, :widget_id]
&lt;/code&gt;

and see if it worked. And for me, using a recent version of everything, it did.

YMMV.]]></description>
		<content:encoded><![CDATA[<p>After spending an hour or so googling for an answer, I decided to just try the equivalent of</p>
<p><code><br />
validates_uniqueness_of :widget_id, :scope =&gt; [:store_id, :size]<br />
validates_uniqueness_of :store_id, :scope =&gt; [:widget_id, :size]<br />
validates_uniqueness_of :size, :scope =&gt; [:store_id, :widget_id]<br />
</code></p>
<p>and see if it worked. And for me, using a recent version of everything, it did.</p>
<p>YMMV.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Grimm</title>
		<link>http://emergent.urbanpug.com/?p=72&#038;cpage=1#comment-14265</link>
		<dc:creator><![CDATA[Andrew Grimm]]></dc:creator>
		<pubDate>Sun, 14 Oct 2007 04:04:27 +0000</pubDate>
		<guid isPermaLink="false">http://emergent.urbanpug.com/?p=72#comment-14265</guid>
		<description><![CDATA[I&#039;m new to RoR, but why are you using validate_on_create rather than validate?]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m new to RoR, but why are you using validate_on_create rather than validate?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emergent Properties &#187; Rails and the MySQL Unique Index with validates_uniqueness_of</title>
		<link>http://emergent.urbanpug.com/?p=72&#038;cpage=1#comment-714</link>
		<dc:creator><![CDATA[Emergent Properties &#187; Rails and the MySQL Unique Index with validates_uniqueness_of]]></dc:creator>
		<pubDate>Thu, 22 Jun 2006 21:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://emergent.urbanpug.com/?p=72#comment-714</guid>
		<description><![CDATA[[...] Update: I&#8217;ve corrected some of my misconceptions about using multiple scopes with one validates uniqueness of.  Read the article. [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Update: I&#8217;ve corrected some of my misconceptions about using multiple scopes with one validates uniqueness of.  Read the article. [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
