egov_utils 1.4.4 → 1.4.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4a3886729d570a5525494c5c4ac720c4b84a63ace576b0844651061adb14b50
|
4
|
+
data.tar.gz: 79f2d1e38ad215c1611dde7519771b3be8780b2900f4db7e7de44d42fb41986a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22670485189a5a46bde82f39322b71e8d18ae2222f8b369d15f5b0faf180c8139c0e94f8b0c86696b2a6b5318feea87dd58a7c10c854dd34de707da56de7cc7d
|
7
|
+
data.tar.gz: 4e286f208dcc5093c6c219483337c82997bf9646f3da4d0f37489aab590878c42e57aa460eeab65f50155e20bc2a77da202a612542601717a3d737b768cb4839
|
@@ -1,5 +1,8 @@
|
|
1
1
|
module EgovUtils
|
2
2
|
class LegalPerson < AbstractPerson
|
3
|
+
before_validation :strip_spaces_from_ico
|
4
|
+
|
5
|
+
validates :ico, length: { is: 8 }
|
3
6
|
|
4
7
|
belongs_to :person, class_name: 'EgovUtils::Person'
|
5
8
|
|
@@ -11,5 +14,10 @@ module EgovUtils
|
|
11
14
|
"#{fullname} (#{ico})"
|
12
15
|
end
|
13
16
|
|
17
|
+
private
|
18
|
+
|
19
|
+
def strip_spaces_from_ico
|
20
|
+
self.ico = ico.to_s.gsub(/\s+/, '') if ico.present?
|
21
|
+
end
|
14
22
|
end
|
15
23
|
end
|
data/lib/egov_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egov_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|