primary_key-uuid-rails 0.0.6 → 0.0.7

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: 4ff7972cb1d8155cfdf0f80af1de8abaec05b11b
4
- data.tar.gz: 45af93254cfcc33b02aabee44d3b861ef15b977e
3
+ metadata.gz: e06131d339bdda1e2b2188c79e30e0d9465661a3
4
+ data.tar.gz: 9432b684d9c395700cc94d5b836f624a3c0574be
5
5
  SHA512:
6
- metadata.gz: ca0a2d53d7d1fefe8223edb0e0db1c9bc46f2533388f894123bd7325239cc5f59d3ea40b8eac8620434e04eda714b9016708fba47574cab8c175e011df0ff8fd
7
- data.tar.gz: cc32ce24285fedcfc3182655c0e31d926ebdf4804841e06c36553805ab3883d8f37282e2bb6063c492fb7a0e4f64aff2bd526fcff58c10cd776398c46852ad47
6
+ metadata.gz: 53f65550f514b49478ae0e593fd74cd644cc27612b1e75fd744bc0a3a6f841f91e608368e485a04f05984668be16400955fec86f565f455736e81513dd7ba66c
7
+ data.tar.gz: ced11fda0d4c8e9d395eec403c585bb4ddd5ede5d356ae1f88ce1bdb949a949494bbf0486d19c8107ae83733a7c0befc42ed320c7b0354953bfa6e76a01dc1ae
@@ -7,7 +7,7 @@ class ActiveRecord::Base
7
7
  return unless self.class.primary_key
8
8
  pk = self.class.primary_key
9
9
  return unless self.class.columns_hash[pk].sql_type == "uuid"
10
- id = ::PrimaryKey::Uuid::Rails.generate
10
+ id = ::PrimaryKey::Uuid::Rails.generate unless id
11
11
  puts self.send(pk)
12
12
  return unless self.send(pk).nil?
13
13
  puts "Set id to #{id}"
@@ -1,7 +1,7 @@
1
1
  module PrimaryKey
2
2
  module Uuid
3
3
  module Rails
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: primary_key-uuid-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann