has_public_id 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/has_public_id/activerecord/mixin.rb +3 -2
- data/lib/has_public_id/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +92 -7075
- metadata +3 -7
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ed3b174e36382079a0edc21faa8f954380b9571
|
4
|
+
data.tar.gz: 1e68251b834bf833d34e98345a9b99cae556105b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25a52539506e0c8a47069fd637f64343960b3260a9f8877471c5790c9b3138e9042bed80bb2afbc06361ada906c06c5dab827a0e190c5a77d2acafa34618e4e6
|
7
|
+
data.tar.gz: 329dd6020f87a2be2019e89b742c55ddbd6113b7f6bfd180f4065267cece183e24d2968972464bb7505c3b446581808c0657aafdb205a4248c5ce174cd29f541
|
@@ -42,9 +42,10 @@ module HasPublicId
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def new_public_id
|
45
|
-
|
46
|
-
|
45
|
+
new_id = ::HasPublicId::Util.new_public_id(self, self.public_id_options)
|
46
|
+
while(self.public_id_options[:check_unique])
|
47
47
|
break unless where(self.public_id_attr => new_id).exists?
|
48
|
+
new_id = ::HasPublicId::Util.new_public_id(self, self.public_id_options)
|
48
49
|
end
|
49
50
|
return new_id
|
50
51
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|