custom_fields 2.12.0 → 2.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/custom_fields/types/default.rb +4 -1
- data/lib/custom_fields/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3357d5d55b5957c388cd463667d4469225b2b2c5fcd2070c352e24356376d1f0
|
4
|
+
data.tar.gz: 074afdf57443c539afc384e140f1c0203f57f719207439bc61cee08733d35947
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f7b9e7dc8dcb0a187ecbe36a05bfcce3a54911b94687beda218ee2b9c9274726eea8ea66598cf3f88cc5b143890f5d772ab9108a4ce90fbd8defd3ad35c8fb2
|
7
|
+
data.tar.gz: dc658cae3dd2628c9e43be55405e7a9c935623995e876976ca6ef751096d4a01604e44a29fdf778c7417f4d988d60f0aaf5a469cd2ea3cfa2477c7644b97e37d
|
@@ -50,7 +50,10 @@ module CustomFields
|
|
50
50
|
klass.field rule['name'], localize: rule['localized'] || false, default: rule['default']
|
51
51
|
|
52
52
|
klass.validates_presence_of rule['name'] if rule['required']
|
53
|
-
|
53
|
+
|
54
|
+
klass.validates_uniqueness_of rule['name'],
|
55
|
+
scope: :_type,
|
56
|
+
allow_blank: !rule['required'] if rule['unique']
|
54
57
|
end
|
55
58
|
|
56
59
|
# Build a hash storing the formatted (or not) values
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: custom_fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.12.
|
4
|
+
version: 2.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Didier Lafforgue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
170
|
+
rubygems_version: 3.2.32
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: Custom fields extension for Mongoid.
|