<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 #ignore eclipse project settings
 .project
 
-pkg
+#pkg
 
 *.log
\ No newline at end of file</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@ PKG_FILES = FileList[
 
 spec = Gem::Specification.new do |s| 
    s.name             = &quot;acts_as_random_id&quot; 
-   s.version          = &quot;1.0.0&quot;
+   s.version          = &quot;0.1.2&quot;
    s.author           = &quot;hashtrain.com and author idea Stanislav Pogrebnyak (stanislav.pogrebnyak@gmail.com)&quot;
    s.email            = &quot;mail@hashtrain.com&quot;
    s.homepage         = &quot;http://github.com/hashtrain/acts_as_random_id/&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -80,6 +80,7 @@
       &lt;h3 class=&quot;section-bar&quot;&gt;Methods&lt;/h3&gt;
 
       &lt;div class=&quot;name-list&quot;&gt;
+      &lt;a href=&quot;#M000002&quot;&gt;ensure_unique_id&lt;/a&gt;&amp;nbsp;&amp;nbsp;
       &lt;a href=&quot;#M000001&quot;&gt;included&lt;/a&gt;&amp;nbsp;&amp;nbsp;
       &lt;/div&gt;
     &lt;/div&gt;
@@ -95,7 +96,6 @@
       &lt;h3 class=&quot;section-bar&quot;&gt;Classes and Modules&lt;/h3&gt;
 
       Module &lt;a href=&quot;ActsAsRandomId/ClassMethods.html&quot; class=&quot;link&quot;&gt;ActsAsRandomId::ClassMethods&lt;/a&gt;&lt;br /&gt;
-Module &lt;a href=&quot;ActsAsRandomId/InstanceMethods.html&quot; class=&quot;link&quot;&gt;ActsAsRandomId::InstanceMethods&lt;/a&gt;&lt;br /&gt;
 
     &lt;/div&gt;
 
@@ -123,10 +123,43 @@ Module &lt;a href=&quot;ActsAsRandomId/InstanceMethods.html&quot; class=&quot;link&quot;&gt;ActsAsRandomId
             onclick=&quot;toggleCode('M000001-source');return false;&quot;&gt;[Source]&lt;/a&gt;&lt;/p&gt;
           &lt;div class=&quot;method-source-code&quot; id=&quot;M000001-source&quot;&gt;
 &lt;pre&gt;
-   &lt;span class=&quot;ruby-comment cmt&quot;&gt;# File lib/acts_as_random_id.rb, line 2&lt;/span&gt;
-2:   &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;included&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;base&lt;/span&gt;)
-3:     &lt;span class=&quot;ruby-identifier&quot;&gt;base&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;:extend&lt;/span&gt;, &lt;span class=&quot;ruby-constant&quot;&gt;ClassMethods&lt;/span&gt; 
-4:   &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
+    &lt;span class=&quot;ruby-comment cmt&quot;&gt;# File lib/acts_as_random_id.rb, line 3&lt;/span&gt;
+ 3:   &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;included&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;base&lt;/span&gt;)
+ 4:     &lt;span class=&quot;ruby-identifier&quot;&gt;base&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;:extend&lt;/span&gt;, &lt;span class=&quot;ruby-constant&quot;&gt;ClassMethods&lt;/span&gt;
+ 5:     
+ 6:     &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;ensure_unique_id&lt;/span&gt;
+ 7:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;begin&lt;/span&gt;
+ 8:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;id&lt;/span&gt; = &lt;span class=&quot;ruby-keyword kw&quot;&gt;yield&lt;/span&gt;
+ 9:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;class&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;exists?&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;:id&lt;/span&gt; =&lt;span class=&quot;ruby-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;id&lt;/span&gt;)
+10:     &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
+11:   &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
+&lt;/pre&gt;
+          &lt;/div&gt;
+        &lt;/div&gt;
+      &lt;/div&gt;
+
+      &lt;h3 class=&quot;section-bar&quot;&gt;Public Instance methods&lt;/h3&gt;
+
+      &lt;div id=&quot;method-M000002&quot; class=&quot;method-detail&quot;&gt;
+        &lt;a name=&quot;M000002&quot;&gt;&lt;/a&gt;
+
+        &lt;div class=&quot;method-heading&quot;&gt;
+          &lt;a href=&quot;#M000002&quot; class=&quot;method-signature&quot;&gt;
+          &lt;span class=&quot;method-name&quot;&gt;ensure_unique_id&lt;/span&gt;&lt;span class=&quot;method-args&quot;&gt;() {|| ...}&lt;/span&gt;
+          &lt;/a&gt;
+        &lt;/div&gt;
+      
+        &lt;div class=&quot;method-description&quot;&gt;
+          &lt;p&gt;&lt;a class=&quot;source-toggle&quot; href=&quot;#&quot;
+            onclick=&quot;toggleCode('M000002-source');return false;&quot;&gt;[Source]&lt;/a&gt;&lt;/p&gt;
+          &lt;div class=&quot;method-source-code&quot; id=&quot;M000002-source&quot;&gt;
+&lt;pre&gt;
+    &lt;span class=&quot;ruby-comment cmt&quot;&gt;# File lib/acts_as_random_id.rb, line 6&lt;/span&gt;
+ 6:     &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;ensure_unique_id&lt;/span&gt;
+ 7:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;begin&lt;/span&gt;
+ 8:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;id&lt;/span&gt; = &lt;span class=&quot;ruby-keyword kw&quot;&gt;yield&lt;/span&gt;
+ 9:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;class&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;exists?&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;:id&lt;/span&gt; =&lt;span class=&quot;ruby-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;id&lt;/span&gt;)
+10:     &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
 &lt;/pre&gt;
           &lt;/div&gt;
         &lt;/div&gt;</diff>
      <filename>rdoc/classes/ActsAsRandomId.html</filename>
    </modified>
    <modified>
      <diff>@@ -80,10 +80,7 @@
       &lt;h3 class=&quot;section-bar&quot;&gt;Methods&lt;/h3&gt;
 
       &lt;div class=&quot;name-list&quot;&gt;
-      &lt;a href=&quot;#M000002&quot;&gt;acts_as_random_id&lt;/a&gt;&amp;nbsp;&amp;nbsp;
-      &lt;a href=&quot;#M000004&quot;&gt;auto_increment&lt;/a&gt;&amp;nbsp;&amp;nbsp;
-      &lt;a href=&quot;#M000003&quot;&gt;generate_random_id&lt;/a&gt;&amp;nbsp;&amp;nbsp;
-      &lt;a href=&quot;#M000005&quot;&gt;random_id&lt;/a&gt;&amp;nbsp;&amp;nbsp;
+      &lt;a href=&quot;#M000003&quot;&gt;acts_as_random_id&lt;/a&gt;&amp;nbsp;&amp;nbsp;
       &lt;/div&gt;
     &lt;/div&gt;
 
@@ -105,87 +102,12 @@
     &lt;div id=&quot;methods&quot;&gt;
       &lt;h3 class=&quot;section-bar&quot;&gt;Public Instance methods&lt;/h3&gt;
 
-      &lt;div id=&quot;method-M000002&quot; class=&quot;method-detail&quot;&gt;
-        &lt;a name=&quot;M000002&quot;&gt;&lt;/a&gt;
-
-        &lt;div class=&quot;method-heading&quot;&gt;
-          &lt;a href=&quot;#M000002&quot; class=&quot;method-signature&quot;&gt;
-          &lt;span class=&quot;method-name&quot;&gt;acts_as_random_id&lt;/span&gt;&lt;span class=&quot;method-args&quot;&gt;(options = {})&lt;/span&gt;
-          &lt;/a&gt;
-        &lt;/div&gt;
-      
-        &lt;div class=&quot;method-description&quot;&gt;
-          &lt;p&gt;&lt;a class=&quot;source-toggle&quot; href=&quot;#&quot;
-            onclick=&quot;toggleCode('M000002-source');return false;&quot;&gt;[Source]&lt;/a&gt;&lt;/p&gt;
-          &lt;div class=&quot;method-source-code&quot; id=&quot;M000002-source&quot;&gt;
-&lt;pre&gt;
-    &lt;span class=&quot;ruby-comment cmt&quot;&gt;# File lib/acts_as_random_id.rb, line 7&lt;/span&gt;
- 7:     &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;acts_as_random_id&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;options&lt;/span&gt; = {})
- 8:       &lt;span class=&quot;ruby-identifier&quot;&gt;cattr_accessor&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;:random_id_generator&lt;/span&gt; 
- 9:       &lt;span class=&quot;ruby-identifier&quot;&gt;before_create&lt;/span&gt;  &lt;span class=&quot;ruby-identifier&quot;&gt;:generate_random_id&lt;/span&gt;
-10: 
-11:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id_generator&lt;/span&gt; = (&lt;span class=&quot;ruby-identifier&quot;&gt;options&lt;/span&gt;[&lt;span class=&quot;ruby-identifier&quot;&gt;:generator&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;:random_id&lt;/span&gt;)
-12: 
-13:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;generate_random_id&lt;/span&gt;
-14:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id_generator&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;is_a?&lt;/span&gt;(&lt;span class=&quot;ruby-constant&quot;&gt;Proc&lt;/span&gt;)
-15:           &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id_generator&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;call&lt;/span&gt;
-16:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id_generator&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;:auto_increment&lt;/span&gt;
-17:           &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;auto_increment&lt;/span&gt;
-18:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;else&lt;/span&gt;
-19:           &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id&lt;/span&gt;
-20:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
-21:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
-22: 
-23:       &lt;span class=&quot;ruby-identifier&quot;&gt;protected&lt;/span&gt;
-24:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;auto_increment&lt;/span&gt;
-25:         &lt;span class=&quot;ruby-identifier&quot;&gt;current_id&lt;/span&gt;  = &lt;span class=&quot;ruby-constant&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ruby-constant&quot;&gt;Base&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;connection&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;select_value&lt;/span&gt;(&lt;span class=&quot;ruby-node&quot;&gt;&amp;quot;SELECT max(#{self.primary_key}) FROM #{self.table_name}&amp;quot;&lt;/span&gt;).&lt;span class=&quot;ruby-identifier&quot;&gt;to_i&lt;/span&gt;
-26:         &lt;span class=&quot;ruby-identifier&quot;&gt;current_id&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;rand&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;10&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt;
-27:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
-28: 
-29:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;random_id&lt;/span&gt;
-30:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;begin&lt;/span&gt;
-31:           &lt;span class=&quot;ruby-identifier&quot;&gt;rand_id&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;rand&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;2_147_483_647&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;ruby-comment cmt&quot;&gt;#- mysql type &amp;quot;int 4 bytes&amp;quot;&lt;/span&gt;
-32:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;until&lt;/span&gt; &lt;span class=&quot;ruby-constant&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ruby-constant&quot;&gt;Base&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;connection&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;select_value&lt;/span&gt;(&lt;span class=&quot;ruby-node&quot;&gt;&amp;quot;SELECT #{self.primary_key} FROM #{self.table_name} WHERE #{self.primary_key} = #{rand_id}&amp;quot;&lt;/span&gt;).&lt;span class=&quot;ruby-identifier&quot;&gt;blank?&lt;/span&gt;
-33:         &lt;span class=&quot;ruby-identifier&quot;&gt;rand_id&lt;/span&gt;
-34:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
-35: 
-36:       &lt;span class=&quot;ruby-identifier&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;:include&lt;/span&gt;, &lt;span class=&quot;ruby-constant&quot;&gt;InstanceMethods&lt;/span&gt;
-37:     &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
-&lt;/pre&gt;
-          &lt;/div&gt;
-        &lt;/div&gt;
-      &lt;/div&gt;
-
-      &lt;div id=&quot;method-M000004&quot; class=&quot;method-detail&quot;&gt;
-        &lt;a name=&quot;M000004&quot;&gt;&lt;/a&gt;
-
-        &lt;div class=&quot;method-heading&quot;&gt;
-          &lt;a href=&quot;#M000004&quot; class=&quot;method-signature&quot;&gt;
-          &lt;span class=&quot;method-name&quot;&gt;auto_increment&lt;/span&gt;&lt;span class=&quot;method-args&quot;&gt;()&lt;/span&gt;
-          &lt;/a&gt;
-        &lt;/div&gt;
-      
-        &lt;div class=&quot;method-description&quot;&gt;
-          &lt;p&gt;&lt;a class=&quot;source-toggle&quot; href=&quot;#&quot;
-            onclick=&quot;toggleCode('M000004-source');return false;&quot;&gt;[Source]&lt;/a&gt;&lt;/p&gt;
-          &lt;div class=&quot;method-source-code&quot; id=&quot;M000004-source&quot;&gt;
-&lt;pre&gt;
-    &lt;span class=&quot;ruby-comment cmt&quot;&gt;# File lib/acts_as_random_id.rb, line 24&lt;/span&gt;
-24:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;auto_increment&lt;/span&gt;
-25:         &lt;span class=&quot;ruby-identifier&quot;&gt;current_id&lt;/span&gt;  = &lt;span class=&quot;ruby-constant&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ruby-constant&quot;&gt;Base&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;connection&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;select_value&lt;/span&gt;(&lt;span class=&quot;ruby-node&quot;&gt;&amp;quot;SELECT max(#{self.primary_key}) FROM #{self.table_name}&amp;quot;&lt;/span&gt;).&lt;span class=&quot;ruby-identifier&quot;&gt;to_i&lt;/span&gt;
-26:         &lt;span class=&quot;ruby-identifier&quot;&gt;current_id&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;rand&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;10&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt;
-27:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
-&lt;/pre&gt;
-          &lt;/div&gt;
-        &lt;/div&gt;
-      &lt;/div&gt;
-
       &lt;div id=&quot;method-M000003&quot; class=&quot;method-detail&quot;&gt;
         &lt;a name=&quot;M000003&quot;&gt;&lt;/a&gt;
 
         &lt;div class=&quot;method-heading&quot;&gt;
           &lt;a href=&quot;#M000003&quot; class=&quot;method-signature&quot;&gt;
-          &lt;span class=&quot;method-name&quot;&gt;generate_random_id&lt;/span&gt;&lt;span class=&quot;method-args&quot;&gt;()&lt;/span&gt;
+          &lt;span class=&quot;method-name&quot;&gt;acts_as_random_id&lt;/span&gt;&lt;span class=&quot;method-args&quot;&gt;(options={}, &amp;amp;block)&lt;/span&gt;
           &lt;/a&gt;
         &lt;/div&gt;
       
@@ -194,42 +116,18 @@
             onclick=&quot;toggleCode('M000003-source');return false;&quot;&gt;[Source]&lt;/a&gt;&lt;/p&gt;
           &lt;div class=&quot;method-source-code&quot; id=&quot;M000003-source&quot;&gt;
 &lt;pre&gt;
-    &lt;span class=&quot;ruby-comment cmt&quot;&gt;# File lib/acts_as_random_id.rb, line 13&lt;/span&gt;
-13:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;generate_random_id&lt;/span&gt;
-14:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id_generator&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;is_a?&lt;/span&gt;(&lt;span class=&quot;ruby-constant&quot;&gt;Proc&lt;/span&gt;)
-15:           &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id_generator&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;call&lt;/span&gt;
-16:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id_generator&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;:auto_increment&lt;/span&gt;
-17:           &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;auto_increment&lt;/span&gt;
+    &lt;span class=&quot;ruby-comment cmt&quot;&gt;# File lib/acts_as_random_id.rb, line 14&lt;/span&gt;
+14:     &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;acts_as_random_id&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;options&lt;/span&gt;={}, &lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;block&lt;/span&gt;)
+15:       &lt;span class=&quot;ruby-identifier&quot;&gt;before_create&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;record&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
+16:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;block&lt;/span&gt;
+17:           &lt;span class=&quot;ruby-identifier&quot;&gt;record&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ensure_unique_id&lt;/span&gt;(&lt;span class=&quot;ruby-operator&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;block&lt;/span&gt;)
 18:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;else&lt;/span&gt;
-19:           &lt;span class=&quot;ruby-keyword kw&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;random_id&lt;/span&gt;
-20:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
-21:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
-&lt;/pre&gt;
-          &lt;/div&gt;
-        &lt;/div&gt;
-      &lt;/div&gt;
-
-      &lt;div id=&quot;method-M000005&quot; class=&quot;method-detail&quot;&gt;
-        &lt;a name=&quot;M000005&quot;&gt;&lt;/a&gt;
-
-        &lt;div class=&quot;method-heading&quot;&gt;
-          &lt;a href=&quot;#M000005&quot; class=&quot;method-signature&quot;&gt;
-          &lt;span class=&quot;method-name&quot;&gt;random_id&lt;/span&gt;&lt;span class=&quot;method-args&quot;&gt;()&lt;/span&gt;
-          &lt;/a&gt;
-        &lt;/div&gt;
-      
-        &lt;div class=&quot;method-description&quot;&gt;
-          &lt;p&gt;&lt;a class=&quot;source-toggle&quot; href=&quot;#&quot;
-            onclick=&quot;toggleCode('M000005-source');return false;&quot;&gt;[Source]&lt;/a&gt;&lt;/p&gt;
-          &lt;div class=&quot;method-source-code&quot; id=&quot;M000005-source&quot;&gt;
-&lt;pre&gt;
-    &lt;span class=&quot;ruby-comment cmt&quot;&gt;# File lib/acts_as_random_id.rb, line 29&lt;/span&gt;
-29:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;random_id&lt;/span&gt;
-30:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;begin&lt;/span&gt;
-31:           &lt;span class=&quot;ruby-identifier&quot;&gt;rand_id&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;rand&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;2_147_483_647&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;ruby-comment cmt&quot;&gt;#- mysql type &amp;quot;int 4 bytes&amp;quot;&lt;/span&gt;
-32:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;until&lt;/span&gt; &lt;span class=&quot;ruby-constant&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ruby-constant&quot;&gt;Base&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;connection&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;select_value&lt;/span&gt;(&lt;span class=&quot;ruby-node&quot;&gt;&amp;quot;SELECT #{self.primary_key} FROM #{self.table_name} WHERE #{self.primary_key} = #{rand_id}&amp;quot;&lt;/span&gt;).&lt;span class=&quot;ruby-identifier&quot;&gt;blank?&lt;/span&gt;
-33:         &lt;span class=&quot;ruby-identifier&quot;&gt;rand_id&lt;/span&gt;
-34:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
+19:           &lt;span class=&quot;ruby-identifier&quot;&gt;record&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;ensure_unique_id&lt;/span&gt; &lt;span class=&quot;ruby-keyword kw&quot;&gt;do&lt;/span&gt;
+20:             &lt;span class=&quot;ruby-identifier&quot;&gt;rand&lt;/span&gt;(&lt;span class=&quot;ruby-value&quot;&gt;2_147_483_647&lt;/span&gt;) &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;ruby-comment cmt&quot;&gt;#- mysql type &amp;quot;int 4 bytes&amp;quot;&lt;/span&gt;
+21:           &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
+22:         &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
+23:       &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
+24:     &lt;span class=&quot;ruby-keyword kw&quot;&gt;end&lt;/span&gt;
 &lt;/pre&gt;
           &lt;/div&gt;
         &lt;/div&gt;</diff>
      <filename>rdoc/classes/ActsAsRandomId/ClassMethods.html</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-Sun, 26 Apr 2009 14:08:38 +0400
+Thu, 07 May 2009 15:33:53 +0400</diff>
      <filename>rdoc/created.rid</filename>
    </modified>
    <modified>
      <diff>@@ -56,7 +56,7 @@
     &lt;/tr&gt;
     &lt;tr class=&quot;top-aligned-row&quot;&gt;
       &lt;td&gt;&lt;strong&gt;Last Update:&lt;/strong&gt;&lt;/td&gt;
-      &lt;td&gt;Sun Apr 26 14:04:55 +0400 2009&lt;/td&gt;
+      &lt;td&gt;Sun Apr 26 15:34:38 +0400 2009&lt;/td&gt;
     &lt;/tr&gt;
     &lt;/table&gt;
   &lt;/div&gt;
@@ -94,7 +94,8 @@ Example
   end
 &lt;/pre&gt;
 &lt;p&gt;
-Copyright (c) 2009 hashtrain.com, released under the MIT license
+Copyright (c) 2009 hashtrain.com and author idea Stanislav Pogrebnyak
+(stanislav.pogrebnyak@gmail.com), released under the MIT license
 &lt;/p&gt;
 
     &lt;/div&gt;</diff>
      <filename>rdoc/files/README.html</filename>
    </modified>
    <modified>
      <diff>@@ -56,7 +56,7 @@
     &lt;/tr&gt;
     &lt;tr class=&quot;top-aligned-row&quot;&gt;
       &lt;td&gt;&lt;strong&gt;Last Update:&lt;/strong&gt;&lt;/td&gt;
-      &lt;td&gt;Sun Apr 26 14:05:12 +0400 2009&lt;/td&gt;
+      &lt;td&gt;Mon May 04 15:32:59 +0400 2009&lt;/td&gt;
     &lt;/tr&gt;
     &lt;/table&gt;
   &lt;/div&gt;</diff>
      <filename>rdoc/files/lib/acts_as_random_id_rb.html</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,6 @@
   &lt;div id=&quot;index-entries&quot;&gt;
     &lt;a href=&quot;classes/ActsAsRandomId.html&quot;&gt;ActsAsRandomId&lt;/a&gt;&lt;br /&gt;
     &lt;a href=&quot;classes/ActsAsRandomId/ClassMethods.html&quot;&gt;ActsAsRandomId::ClassMethods&lt;/a&gt;&lt;br /&gt;
-    &lt;a href=&quot;classes/ActsAsRandomId/InstanceMethods.html&quot;&gt;ActsAsRandomId::InstanceMethods&lt;/a&gt;&lt;br /&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 &lt;/body&gt;</diff>
      <filename>rdoc/fr_class_index.html</filename>
    </modified>
    <modified>
      <diff>@@ -20,12 +20,9 @@
 &lt;div id=&quot;index&quot;&gt;
   &lt;h1 class=&quot;section-bar&quot;&gt;Methods&lt;/h1&gt;
   &lt;div id=&quot;index-entries&quot;&gt;
-    &lt;a href=&quot;classes/ActsAsRandomId/ClassMethods.html#M000002&quot;&gt;acts_as_random_id (ActsAsRandomId::ClassMethods)&lt;/a&gt;&lt;br /&gt;
-    &lt;a href=&quot;classes/ActsAsRandomId/ClassMethods.html#M000004&quot;&gt;auto_increment (ActsAsRandomId::ClassMethods)&lt;/a&gt;&lt;br /&gt;
-    &lt;a href=&quot;classes/ActsAsRandomId/ClassMethods.html#M000003&quot;&gt;generate_random_id (ActsAsRandomId::ClassMethods)&lt;/a&gt;&lt;br /&gt;
-    &lt;a href=&quot;classes/ActsAsRandomId/InstanceMethods.html#M000006&quot;&gt;generate_random_id (ActsAsRandomId::InstanceMethods)&lt;/a&gt;&lt;br /&gt;
+    &lt;a href=&quot;classes/ActsAsRandomId/ClassMethods.html#M000003&quot;&gt;acts_as_random_id (ActsAsRandomId::ClassMethods)&lt;/a&gt;&lt;br /&gt;
+    &lt;a href=&quot;classes/ActsAsRandomId.html#M000002&quot;&gt;ensure_unique_id (ActsAsRandomId)&lt;/a&gt;&lt;br /&gt;
     &lt;a href=&quot;classes/ActsAsRandomId.html#M000001&quot;&gt;included (ActsAsRandomId)&lt;/a&gt;&lt;br /&gt;
-    &lt;a href=&quot;classes/ActsAsRandomId/ClassMethods.html#M000005&quot;&gt;random_id (ActsAsRandomId::ClassMethods)&lt;/a&gt;&lt;br /&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 &lt;/body&gt;</diff>
      <filename>rdoc/fr_method_index.html</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>rdoc/classes/ActsAsRandomId/InstanceMethods.html</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>10c010355ce27c746890a6d53272745f28d73cf1</id>
    </parent>
  </parents>
  <author>
    <name>Shaliko Usubov</name>
    <email>shaliko@ezid.ru</email>
  </author>
  <url>http://github.com/hashtrain/acts_as_random_id/commit/4e2f801197297a9a2fae5b4f77545e734c5e8e56</url>
  <id>4e2f801197297a9a2fae5b4f77545e734c5e8e56</id>
  <committed-date>2009-05-07T04:35:14-07:00</committed-date>
  <authored-date>2009-05-07T04:35:14-07:00</authored-date>
  <message>Add gem</message>
  <tree>ce9f1f85bc2c90ea6dd8b77982c04eff785e518b</tree>
  <committer>
    <name>Shaliko Usubov</name>
    <email>shaliko@ezid.ru</email>
  </committer>
</commit>
