arkaan 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arkaan/campaign.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fef3f8545681fb10e24aed9eb6c62b0bab66da74
|
4
|
+
data.tar.gz: 642c8861fa417116ec20ac75215ca2d5594685d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2c0e2500ccfb9613b3f848acb31fba6be675a26a1f3d4d6e58b6200ac39c6666f68d1629b9d5d70645eb7c13b45f2ed1325af48376b68f6c6e8236b774c092e
|
7
|
+
data.tar.gz: a18579f1be89115fd0391bd4de4003e0bff8b60b21f0ad89d660de713c6de6e1257da091429578bb958ac85463114cb49e583caeebb62180743e419412cea2e7
|
data/lib/arkaan/campaign.rb
CHANGED
@@ -36,6 +36,12 @@ module Arkaan
|
|
36
36
|
presence: {message: 'required'},
|
37
37
|
length: {minimum: 4, message: 'minlength', if: :title?}
|
38
38
|
|
39
|
+
validates :max_players,
|
40
|
+
numericality: {less_than: 21, message: 'maximum'}
|
41
|
+
|
42
|
+
validates :max_players,
|
43
|
+
numericality: {greater_than: 0, message: 'minimum'}
|
44
|
+
|
39
45
|
validate :title_unicity
|
40
46
|
|
41
47
|
# Sets the creator of the campaign. This method is mainly used for backward-compatibility needs.
|