motor-admin 0.1.102 → 0.1.103

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: e4dc0135509e3cbc5042ef05c51b87bf6edfb0b268e441797d382ec223d62d54
4
- data.tar.gz: a8c2b647964b33e2c14924b68a3a28cfc0a45c0bfaabedd5d5e661632a7754f8
3
+ metadata.gz: 43a3f7d2e7af7a08e482f092dc5cd3e988f6f60e144f4dab98f76ea9ee7a2c7e
4
+ data.tar.gz: 23fdd15f65158da7db875355a79ef8059b7614ca21e870df76c5c1b171660f33
5
5
  SHA512:
6
- metadata.gz: e9145465842ca373d59012efc2556dd5f29a422babc3b2a833dc6bbb1a17a6a7f766a36d2145f0d4e533fe9c977462dfd21a1240a2ca05223f316b0e76be3d00
7
- data.tar.gz: c23426c0b44429b7998b6708bec88e9a8d9c50a051b0338615b98cbfc2639891dcc8f5af606d002613e97afb8e5d1b750675aa8853fdf8a35f1caaac36d03ed2
6
+ metadata.gz: b41c98a04acf728ded9f596740c3c900d448b4697eb2067cb2c518b41386dfc4a04fcb671360ef74e33a74c5fa6d4644ca62b62246597e9005781fd60a1a055e
7
+ data.tar.gz: b87007440e00347b58fda93b21121a683f1bfd9b263996b4681e39921510ea002184eee955878c19c7c81e6a121f800de2bacb0bffb9b1ace3eaa07b88ef87b3
@@ -82,6 +82,8 @@ en:
82
82
  field_is_required: '%{field} is required'
83
83
  field_list_cant_be_empty: "%{field} list can't be empty"
84
84
  field_must_be_exactly_in_length: '%{field} must be exactly %{length} in length'
85
+ field_must_be_less_in_length: '%{field} must be less than %{length} in length'
86
+ field_must_be_more_in_length: '%{field} must be more than %{length} in length'
85
87
  field_name: Field name
86
88
  field_value_does_not_match_pattern: '%{field} value does not match %{pattern}'
87
89
  file: File
@@ -179,6 +179,8 @@ es:
179
179
  field_is_required: '%{field} es obligatorio'
180
180
  field_list_cant_be_empty: "La lista %{field} no puede estar vacía"
181
181
  field_must_be_exactly_in_length: '%{field} debe tener un largo de %{length} caracteres'
182
+ field_must_be_less_in_length: '%{field} debe tener una longitud inferior a %{length}'
183
+ field_must_be_more_in_length: '%{field} debe tener una longitud superior a %{length}'
182
184
  field_value_does_not_match_pattern: 'El valor de %{field} no coincide con %{pattern}'
183
185
  file: Archivo
184
186
  greater_or_equal: Mayor o igual
@@ -290,12 +290,20 @@ module Motor
290
290
  when ActiveModel::Validations::FormatValidator
291
291
  { format: JsRegex.new(options[:with]).to_h.slice(:source, :options) }
292
292
  when ActiveRecord::Validations::LengthValidator
293
- { length: options }
293
+ { length: normalize_length_validation_options(options) }
294
294
  when ActiveModel::Validations::NumericalityValidator
295
295
  { numeric: options }
296
296
  end
297
297
  end
298
298
 
299
+ def normalize_length_validation_options(options)
300
+ return options if options[:in].blank?
301
+
302
+ in_range = options[:in]
303
+
304
+ options.merge(in: in_range.minmax)
305
+ end
306
+
299
307
  def valid_reflection?(reflection)
300
308
  reflection.klass
301
309
  reflection.foreign_key
data/lib/motor/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motor
4
- VERSION = '0.1.102'
4
+ VERSION = '0.1.103'
5
5
  end
@@ -2601,9 +2601,9 @@
2601
2601
  "icons/zoom-out.svg.gz": "icons/zoom-out.svg.gz",
2602
2602
  "icons/zoom-question.svg": "icons/zoom-question.svg",
2603
2603
  "icons/zoom-question.svg.gz": "icons/zoom-question.svg.gz",
2604
- "main-61a9a4d250915792b3e7.css.gz": "main-61a9a4d250915792b3e7.css.gz",
2605
- "main-61a9a4d250915792b3e7.js.LICENSE.txt": "main-61a9a4d250915792b3e7.js.LICENSE.txt",
2606
- "main-61a9a4d250915792b3e7.js.gz": "main-61a9a4d250915792b3e7.js.gz",
2607
- "main.css": "main-61a9a4d250915792b3e7.css",
2608
- "main.js": "main-61a9a4d250915792b3e7.js"
2604
+ "main-37390abd2976b4fd28f0.css.gz": "main-37390abd2976b4fd28f0.css.gz",
2605
+ "main-37390abd2976b4fd28f0.js.LICENSE.txt": "main-37390abd2976b4fd28f0.js.LICENSE.txt",
2606
+ "main-37390abd2976b4fd28f0.js.gz": "main-37390abd2976b4fd28f0.js.gz",
2607
+ "main.css": "main-37390abd2976b4fd28f0.css",
2608
+ "main.js": "main-37390abd2976b4fd28f0.js"
2609
2609
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motor-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.102
4
+ version: 0.1.103
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-19 00:00:00.000000000 Z
11
+ date: 2021-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter
@@ -1536,8 +1536,8 @@ files:
1536
1536
  - ui/dist/icons/zoom-money.svg.gz
1537
1537
  - ui/dist/icons/zoom-out.svg.gz
1538
1538
  - ui/dist/icons/zoom-question.svg.gz
1539
- - ui/dist/main-61a9a4d250915792b3e7.css.gz
1540
- - ui/dist/main-61a9a4d250915792b3e7.js.gz
1539
+ - ui/dist/main-37390abd2976b4fd28f0.css.gz
1540
+ - ui/dist/main-37390abd2976b4fd28f0.js.gz
1541
1541
  - ui/dist/manifest.json
1542
1542
  homepage:
1543
1543
  licenses: