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 +4 -4
- data/lib/cmor/core/model/localization_concern.rb +6 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a90f86e10b32eeb1836a0b6a8c7cf209e31036d21c11ff363bda7d3d323abde
|
4
|
+
data.tar.gz: ead75dcd8d132699d375b8b2151b618f2898796fe0ef45b5bc326d4927cd865f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
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.
|
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.
|
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
|