cmor_core 0.0.58.pre → 0.0.59.pre

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: b6c603ce9a5e1b574a96f6524f4b82bfcd55e54a75cf17cf7c6e6d201b0c7c12
4
- data.tar.gz: ffef067b211580917704ef3fa8d6ccd20367cb1d74411a47d17a9dabaa3a0f70
3
+ metadata.gz: 0a90f86e10b32eeb1836a0b6a8c7cf209e31036d21c11ff363bda7d3d323abde
4
+ data.tar.gz: ead75dcd8d132699d375b8b2151b618f2898796fe0ef45b5bc326d4927cd865f
5
5
  SHA512:
6
- metadata.gz: f0dd46161ace8572c34b19456b14ebf823ad416572e3eba588d568058a82839364652d5df978feff498e7413e3e604c39b1f07457a72b1ea5aff2f77ef435514
7
- data.tar.gz: 0e407de86217d09f6e8830d555befe94210791bf82ffd9ebcff6abc25e48a9134fd44cfa83e3da526bd0a79c4c13d471bb69f045bf72f86b47fb9caea34b83ef
6
+ metadata.gz: d92a51e6cf209b8fb79243bea0b594ec2b70f1b25a0e97a9d229e295376eec653e710cdd147e6a2e10cc10a2f54ab34b31ef8e36ebbae7ef00b8d2c6947f1ffe
7
+ data.tar.gz: 7ba5e6dc4dc1d0fa3ac52bc4d880d3a2b3a0474cc3d5fe9bd157e7700aac4d11c7312181e8d893decd9ce91400d5865ac5e005d2496e01a7f6d832021015fe32
@@ -5,7 +5,7 @@ module Cmor
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- validates :locale, inclusion: { in: I18n.available_locales.map(&:to_s) }, allow_nil: true, allow_blank: true
8
+ validates :locale, inclusion: { in: I18n.available_locales.map(&:to_s) }, allow_nil: true
9
9
 
10
10
  scope :for_locale, ->(locale = I18n.locale, options = {}) do
11
11
  options.reverse_merge!(include_without_locale: true)
@@ -16,6 +16,11 @@ module Cmor
16
16
  where(locale: locale)
17
17
  end
18
18
  end
19
+
20
+ # We have to override the setter for the locale to avoid empty strings as locale value.
21
+ def locale=(value)
22
+ super(value.blank? ? nil : value)
23
+ end
19
24
  end
20
25
  end
21
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.58.pre
4
+ version: 0.0.59.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-17 00:00:00.000000000 Z
11
+ date: 2020-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.58.pre
33
+ version: 0.0.59.pre
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.0.58.pre
40
+ version: 0.0.59.pre
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: delayed_job_active_record
43
43
  requirement: !ruby/object:Gem::Requirement