unidom-position 1.5.7 → 1.5.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4b642a83456aff849e3458eac64af8bdb5bdec1
|
4
|
+
data.tar.gz: f5d49dddcdbc8319310f2a70936843c8efedf953
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0857c5a2ba065b53eb1a2fff10ce467a77535b25d8536af9b0d029b64546d982c93ff4af59178efd1722e9f0dd6cfcb9c95a0423e2726a4f5dc350716b5a10cf'
|
7
|
+
data.tar.gz: 015de50c06d72595d45aa0832313474641af14aa66e09332d3503786a0a014a94568ed0010e0a411272a50202a5ac84abf4e24df105acadc288264c5c377a4f1
|
@@ -3,7 +3,8 @@
|
|
3
3
|
|
4
4
|
module Unidom::Position::Concerns::AsInferiorPost
|
5
5
|
|
6
|
-
extend
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
include Unidom::Common::Concerns::ArgumentValidation
|
7
8
|
|
8
9
|
included do |includer|
|
9
10
|
|
@@ -15,6 +16,9 @@ module Unidom::Position::Concerns::AsInferiorPost
|
|
15
16
|
# 主要汇报标志是 primary ,缺省为 true 。建立时间是 at ,缺省为当前时间。如:
|
16
17
|
# rails_developer.report_to! project_manager, primary: false
|
17
18
|
def report_to!(superior_post, at: Time.now, primary: true)
|
19
|
+
|
20
|
+
assert_present! :superior_post, superior_post
|
21
|
+
|
18
22
|
superior_post_reporting_structures.superior_post_is(superior_post).valid_at(now: at).alive.first_or_create! elemental: primary, opened_at: at
|
19
23
|
end
|
20
24
|
|
@@ -3,7 +3,8 @@
|
|
3
3
|
|
4
4
|
module Unidom::Position::Concerns::AsSuperiorPost
|
5
5
|
|
6
|
-
extend
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
include Unidom::Common::Concerns::ArgumentValidation
|
7
8
|
|
8
9
|
included do |includer|
|
9
10
|
|
@@ -15,6 +16,9 @@ module Unidom::Position::Concerns::AsSuperiorPost
|
|
15
16
|
# 主要汇报标志是 primary ,缺省为 true 。建立时间是 at ,缺省为当前时间。如:
|
16
17
|
# project_manager.is_reported_to! by: rails_developer, primary: false
|
17
18
|
def is_reported_to!(by: nil, at: Time.now, primary: true)
|
19
|
+
|
20
|
+
assert_present! :by, by
|
21
|
+
|
18
22
|
inferior_post_reporting_structures.inferior_post_is(by).valid_at(now: at).alive.first_or_create! elemental: primary, opened_at: at
|
19
23
|
end
|
20
24
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-position
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|