unidom-position 1.5.5 → 1.5.6
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: f0813c4e46f3fbc13975ba48100dab648537a148
|
4
|
+
data.tar.gz: 9048d4fb96b701b1b75bcf5ee5fc906005521dbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e9bcce5614ccbc20f78cf16c2fa083763c523cde625576acfb7dc56bfaffc0e0e790b6980822e3c33252deba48d8aacbc0c54fe5e7b921252a59f32737515f4
|
7
|
+
data.tar.gz: d026bdaa309541c8182303716ef3b83e4971007b290df95faed67938bb0895b406515689c9429de34bc3ae20273c09f126f7cbd3fd5118c55d72ce99c9179590
|
@@ -14,4 +14,6 @@ class Unidom::Position::Position < Unidom::Position::ApplicationRecord
|
|
14
14
|
|
15
15
|
has_many :posts, class_name: 'Unidom::Position::Post'
|
16
16
|
|
17
|
+
scope :occupation_is, ->(occupation) { where occupation: occupation }
|
18
|
+
|
17
19
|
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Position::Position'
|
@@ -17,7 +17,8 @@ describe Unidom::Position::Occupation, type: :model do
|
|
17
17
|
|
18
18
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
19
19
|
|
20
|
-
it_behaves_like 'validates text', model_attributes, :name,
|
20
|
+
it_behaves_like 'validates text', model_attributes, :name,
|
21
|
+
length: 2..described_class.columns_hash['name'].limit
|
21
22
|
|
22
23
|
position_1_attributes = {
|
23
24
|
organization_id: SecureRandom.uuid,
|
@@ -42,6 +42,8 @@ describe Unidom::Position::Position, type: :model do
|
|
42
42
|
|
43
43
|
it_behaves_like 'has_many', model_attributes, :posts, Unidom::Position::Post, [ post_1_attributes, post_2_attributes ]
|
44
44
|
|
45
|
+
it_behaves_like 'monomorphic scope', model_attributes, :occupation_is, :occupation
|
46
|
+
|
45
47
|
end
|
46
48
|
|
47
49
|
end
|
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.6
|
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-
|
11
|
+
date: 2017-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|