usps-support 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 761e690bb6f2b95e6075471bfb0db75f7b59cf060c9b14373f9bba91dbbd05d8
|
|
4
|
+
data.tar.gz: 3761939f20b64a6d07ac5fc3bc5d17f8c54be74fc09866c414439447ded0f2fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39bcfc845ce7507504f96d6a45446a6e858428d29748b86288a851835d2d8f18e3151db7800f71d4f32d9d662c58ee714f586527062df92255a0db06c0e8fc60
|
|
7
|
+
data.tar.gz: 4b13aa5bd085dae1afe42788f1b8d99b83e4129812219d0bf13c8b24d7daaf96bbe661bc3127267128827822dff6d787c110de394674a0fb20d91bf57fa74ea3
|
|
@@ -23,11 +23,21 @@ module Usps::Support::Models::Hq::Members
|
|
|
23
23
|
foreign_key: :jobcode, primary_key: :jobcode, inverse_of: :district_jobs
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
+
validate :enforce_account
|
|
27
|
+
|
|
26
28
|
def acting? = acting == 'Y'
|
|
27
29
|
|
|
28
30
|
def description
|
|
29
31
|
desc = district_job_description.jdesc
|
|
30
32
|
acting? ? "#{desc} (Acting)" : desc
|
|
31
33
|
end
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
def enforce_account
|
|
38
|
+
return if account.present? && account.to_i.positive?
|
|
39
|
+
|
|
40
|
+
errors.add(:account, 'must be present')
|
|
41
|
+
end
|
|
32
42
|
end
|
|
33
43
|
end
|
|
@@ -9,7 +9,8 @@ module Usps::Support::Models::Hq::Members
|
|
|
9
9
|
|
|
10
10
|
belongs_to(
|
|
11
11
|
:squadron,
|
|
12
|
-
class_name: '::Squadrons::Squadron',
|
|
12
|
+
class_name: '::Squadrons::Squadron',
|
|
13
|
+
foreign_key: 'account', primary_key: 'account', inverse_of: :squadron_jobs
|
|
13
14
|
)
|
|
14
15
|
belongs_to(
|
|
15
16
|
:member,
|
|
@@ -22,11 +23,21 @@ module Usps::Support::Models::Hq::Members
|
|
|
22
23
|
foreign_key: :jobcode, primary_key: :jobcode, inverse_of: :squadron_jobs
|
|
23
24
|
)
|
|
24
25
|
|
|
26
|
+
validate :enforce_account
|
|
27
|
+
|
|
25
28
|
def acting? = acting == 'Y'
|
|
26
29
|
|
|
27
30
|
def description
|
|
28
31
|
desc = squadron_job_description.jdesc
|
|
29
32
|
acting? ? "#{desc} (Acting)" : desc
|
|
30
33
|
end
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
def enforce_account
|
|
38
|
+
return if account.present? && account.to_i.positive?
|
|
39
|
+
|
|
40
|
+
errors.add(:account, 'must be present')
|
|
41
|
+
end
|
|
31
42
|
end
|
|
32
43
|
end
|
data/lib/usps/support/version.rb
CHANGED