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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17681068cf9fad1ccde3d640318e89bd52aa65f3
4
- data.tar.gz: 07c0360bd448332778f07c3951294a9834632473
3
+ metadata.gz: 8ed3b174e36382079a0edc21faa8f954380b9571
4
+ data.tar.gz: 1e68251b834bf833d34e98345a9b99cae556105b
5
5
  SHA512:
6
- metadata.gz: 31fa3a91d4685fd1e85f24b07a0876e553928efe74d997120ed59598d30370cc197436456de4310f32f53871d7a3753682d48f0d076233903d3702ad9f9b1e03
7
- data.tar.gz: ee1967309c8233ccd9ea209136b18a6dd57770e832f21452b3bcbcf4cef1c02921a97bace4965657f5fe41d533c95c98e72ea58fbe34b28b28b247813e983cc1
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
- while(true)
46
- new_id = ::HasPublicId::Util.new_public_id(self, self.public_id_options)
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
@@ -1,3 +1,3 @@
1
1
  module HasPublicId
2
- VERSION = "1.1.8"
2
+ VERSION = "1.1.9"
3
3
  end
Binary file