<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,10 +4,16 @@ ActiveRecord::Schema.define(:version =&gt; 1) do
     t.column :title, :string
     t.column :slug, :string
   end
-  
+
   create_table :products do |t|
     t.column :name, :string
     t.column :permalink, :string
   end
-  
+
+  create_table :articles do |t|
+    t.column :title, :string
+    t.column :body, :text
+    t.column :author, :string
+    t.column :permalink, :string
+  end
 end
\ No newline at end of file</diff>
      <filename>test/schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,9 @@ class Product &lt; ActiveRecord::Base
   has_slug :source_column =&gt; :name, :slug_column =&gt; :permalink, :prepend_id =&gt; false, :sync_slug =&gt; true
 end
 
+class Article &lt; ActiveRecord::Base
+  has_slug :slug_column =&gt; :permalink, :prepend_id =&gt; false, :sync_slug =&gt; true, :scope =&gt; :author
+end
 
 class PostPublicSluggify &lt; ActiveRecord::Base
   has_slug
@@ -19,6 +22,7 @@ class SlugTest &lt; Test::Unit::TestCase
   def setup
     @post = Post.create(:title =&gt; &quot;Can has cheesburger?&quot;)
     @product = Product.create(:name =&gt; &quot;Salt Shaker&quot;)
+    @article = Article.create(:title =&gt; &quot;Lock On Black Shark&quot;, :author =&gt; &quot;Siddhaarth Verma&quot;, :body =&gt; &quot;It's gonna be the Mecca for simulation fans!&quot;)
   end
   
   def teardown
@@ -50,6 +54,12 @@ class SlugTest &lt; Test::Unit::TestCase
     assert_raise(ActiveRecord::RecordInvalid) { Product.create!(:name =&gt; &quot;!!!~~Salt SHAKER~~~!!!!&quot;) }
   end
   
+  def test_uniqueness_of_slug_with_scope
+    assert_nothing_raised { Article.create!(:title =&gt; &quot;Left 4 Dead&quot;, :author =&gt; &quot;Siddhaarth Verma&quot;, :body =&gt; &quot;Valve has done it again! This is a zombie fragging masterpiece.&quot;) }
+    assert_nothing_raised { Article.create!(:title =&gt; &quot;Left 4 Dead&quot;, :author =&gt; &quot;Sid&quot;, :body =&gt; &quot;The co-op multiplayer game of the year!&quot;) }
+    assert_raise(ActiveRecord::RecordInvalid) { Article.create!(:title =&gt; &quot;Lock On Black Shark&quot;, :author =&gt; &quot;Siddhaarth Verma&quot;, :body =&gt; &quot;The most authentic gunship simuator ever.&quot;) }
+  end
+  
   def test_sync_slug
     @post.title, @product.name = 'foo', 'bar'
     @post.save</diff>
      <filename>test/slug_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d1e9d23014afcb86b9f1695333a5a3f6f91ea1d8</id>
    </parent>
  </parents>
  <author>
    <name>Sid</name>
    <email>sid@norbauer.com</email>
  </author>
  <url>http://github.com/norbauer/salty_slugs/commit/0a55f2db564f70de918eea1030a196978ecb84ef</url>
  <id>0a55f2db564f70de918eea1030a196978ecb84ef</id>
  <committed-date>2008-12-08T23:08:46-08:00</committed-date>
  <authored-date>2008-12-08T23:08:46-08:00</authored-date>
  <message>Wrote test for uniqueness of slug with scope.</message>
  <tree>4399a4fbf03b6871cf48dd932e65c3cf0d52feff</tree>
  <committer>
    <name>Sid</name>
    <email>sid@norbauer.com</email>
  </committer>
</commit>
