custom_fields 2.10.0.rc1 → 2.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a75900d342dfaf1ea67c7911b4bd51080e4f64499a488a9973efdb7f607ee11e
4
- data.tar.gz: 6cb9af25862c3a16a7c8f505b158882500506e06e37a105b3e185e648cd61e92
3
+ metadata.gz: 3357d5d55b5957c388cd463667d4469225b2b2c5fcd2070c352e24356376d1f0
4
+ data.tar.gz: 074afdf57443c539afc384e140f1c0203f57f719207439bc61cee08733d35947
5
5
  SHA512:
6
- metadata.gz: 658a1a08a5889cbf8f2f52243eeca81f149d9fa7dad4d2557daea6a4c387654db6a5c1470cb08a6744ce11880567534bee814060c3741d8fcbb62c78d9a20148
7
- data.tar.gz: f54950d57371f706065bf6dfe43105afc3282a67f83923bdddb02cd51fd440a8f49e09cc0328f9dad20663c3415bec1137dafffc78e925d5463b8f9d75bd878f
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
- klass.validates_uniqueness_of rule['name'], scope: :_type if rule['unique']
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
@@ -1,5 +1,5 @@
1
1
  module CustomFields #:nodoc
2
2
 
3
- VERSION = '2.10.0.rc1'
3
+ VERSION = '2.12.1'
4
4
 
5
5
  end
data/lib/custom_fields.rb CHANGED
@@ -10,7 +10,7 @@ Money.locale_backend = :currency
10
10
  module CustomFields
11
11
 
12
12
  @@options = {
13
- reserved_names: Mongoid.destructive_fields + %w(id _id send class destroy),
13
+ reserved_names: Mongoid.destructive_fields + %w(id _id send class destroy system),
14
14
  default_currency: 'EUR'
15
15
  }
16
16
 
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.10.0.rc1
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: 2019-11-17 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 1.1.0
39
+ version: 1.3.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 1.1.0
46
+ version: 1.3.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activesupport
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -160,14 +160,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
160
  requirements:
161
161
  - - "~>"
162
162
  - !ruby/object:Gem::Version
163
- version: '2.3'
163
+ version: '2.6'
164
164
  required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - ">"
166
+ - - ">="
167
167
  - !ruby/object:Gem::Version
168
- version: 1.3.1
168
+ version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.0.1
170
+ rubygems_version: 3.2.32
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: Custom fields extension for Mongoid.