uuid_attribute 0.9.2 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uuid_attribute/railtie.rb +8 -8
- data/lib/uuid_attribute/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f85ae3b4a252304cf10c48d8b60c99edcd94678c76ebe8a428058068fa98436d
|
4
|
+
data.tar.gz: ad5b98d61451ffc3c1ec87d2e2e8e07f84018fbe86f2985a44342d45274b2b5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2a3c52582c3057eec1738a754e60305b746051588fee63f20d170626d37f4c1494b0aba69ddfe14c9723dc2f7ecba3d891d800d19da650ea336b73288cf5068
|
7
|
+
data.tar.gz: d216fb0be1ec34eae2a58ae105d498e5c29e916f6b11447b7cf32f1c7d405114a2cdbeecee38f80ca63ef5819550ce2e6ab710c71a562d7f945bca524126fc0a
|
@@ -58,16 +58,16 @@ module UuidAttribute
|
|
58
58
|
end
|
59
59
|
|
60
60
|
config.after_initialize do
|
61
|
-
|
61
|
+
unless ARGV.include? "assets:"
|
62
|
+
ActiveRecord::Type.register(:uuid, ::UuidAttribute::UUID)
|
62
63
|
|
63
|
-
|
64
|
+
configure_binary_ids if UuidAttribute.auto_detect_binary_ids
|
64
65
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
g.orm :active_record, primary_key_type: "binary, limit: 16"
|
66
|
+
if UuidAttribute.default_primary_id
|
67
|
+
# Configure UUID as Default Primary Key
|
68
|
+
Rails&.application&.config&.generators do |g|
|
69
|
+
g.orm :active_record, primary_key_type: "binary, limit: 16"
|
70
|
+
end
|
71
71
|
end
|
72
72
|
end
|
73
73
|
end
|