<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -40,7 +40,7 @@ module RailheadPermalink
         unless self.permalink == key
           permalink = key
           while permalink_options[:reserved_names].include?(permalink) or permalink.blank? or
-            (self.class.exists?(:permalink =&gt; permalink) and not self == self.class.find_without_permalink(:first, :conditions =&gt; {:permalink =&gt; permalink}))
+            (object = self.class.find_without_permalink(:first, :conditions =&gt; {:permalink =&gt; permalink}) and object != self)
               counter.succ!
               permalink = key + counter
           end
@@ -57,3 +57,4 @@ end
 
 
 ActiveRecord::Base.send :include, RailheadPermalink
+</diff>
      <filename>lib/railhead_permalink.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 Gem::Specification.new do |s|
   s.name     = &quot;railhead_permalink&quot;
-  s.version  = &quot;0.1.11&quot;
-  s.date     = &quot;2009-03-12&quot;
+  s.version  = &quot;0.1.12&quot;
+  s.date     = &quot;2009-10-14&quot;
   s.summary  = &quot;RailheadPermalink is a Ruby on Rails plugin that automatically finds ActiveRecord objects with permalink.&quot;
   s.email    = &quot;nagybence@tipogral.hu&quot;
   s.homepage = &quot;http://github.com/nagybence/railhead_permalink&quot;</diff>
      <filename>railhead_permalink.gemspec</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a304be1e6b52866f9a2167a991b835a1dddd0102</id>
    </parent>
  </parents>
  <author>
    <name>Nagy Bence</name>
    <email>nagybence@localhost.localdomain</email>
  </author>
  <url>http://github.com/nagybence/railhead_permalink/commit/7e8175a917e122e70b5b262c273a6a42bda2665a</url>
  <id>7e8175a917e122e70b5b262c273a6a42bda2665a</id>
  <committed-date>2009-10-14T13:38:46-07:00</committed-date>
  <authored-date>2009-10-14T13:38:46-07:00</authored-date>
  <message>corrected permalnk generation</message>
  <tree>39be2a8f5716dc750db642409c25cfc865393ef1</tree>
  <committer>
    <name>Nagy Bence</name>
    <email>nagybence@localhost.localdomain</email>
  </committer>
</commit>
