Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Release UniqueGenerator 1.0.0

  • Loading branch information...
commit 99e853da5ab80e6f30bf28ad3d2ac7504ad406ca 1 parent 954d8b3
@Sutto authored
Showing with 8 additions and 10 deletions.
  1. +7 −9 lib/unique_generator.rb
  2. +1 −1  lib/unique_generator/version.rb
View
16 lib/unique_generator.rb
@@ -61,18 +61,16 @@ def generate_random(length = 32)
end
- module InstanceMethods
- # Generate unique field.
- def generate_unique_field!(name, size = 32)
- return if send(name).present?
- self.class.generate_unique(size) do |token|
- send "#{name}=", token
- unique_field? name
- end
+ # Generate unique field.
+ def generate_unique_field!(name, size = 32)
+ return if send(name).present?
+ self.class.generate_unique(size) do |token|
+ send "#{name}=", token
+ unique_field? name
end
-
end
+
setup!
View
2  lib/unique_generator/version.rb
@@ -1,3 +1,3 @@
module UniqueGenerator
- VERSION = "0.0.3"
+ VERSION = "1.0.0"
end
Please sign in to comment.
Something went wrong with that request. Please try again.