ish_models 0.0.33.164 → 0.0.33.166
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gameui/marker.rb +5 -1
- data/lib/ish/unsubscribe.rb +11 -0
- data/lib/ish/user_profile.rb +3 -0
- data/lib/ish_models.rb +1 -0
- data/lib/tag.rb +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d2c393a3ae573621c06610661cda6a73bf8173aeaeea1ee126256c31d0848a4
|
4
|
+
data.tar.gz: ff72185a3f761ddd7dd5efdb8bbf99428763ab763319c6da3b3ad2d35216d575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3bc3cb6150bcc21a7f60ee41b66f694f6290677d5908e698d47d879a76298a3307e2871d54fde5fcdc911906b3a64052e6e2d4d94f98b481617386e0851653d
|
7
|
+
data.tar.gz: c16e81ddfbb6051e2b2907e6685fb8dd77b7b9304ef9741191a3619b72c69317ddff2b78b84a0a665d0b3afe4016929e9efbd5664c87d4c733bdf4fd62914fb8
|
data/lib/gameui/marker.rb
CHANGED
@@ -7,8 +7,12 @@ class ::Gameui::Marker
|
|
7
7
|
field :name, type: String
|
8
8
|
validates_uniqueness_of :name, scope: :map_id
|
9
9
|
validates_presence_of :name
|
10
|
+
|
11
|
+
## This is not a map, I don't need a slug.
|
12
|
+
## @TODO: remove it. _vp_ 2022-06-17
|
13
|
+
field :slug
|
10
14
|
def slug
|
11
|
-
id.to_s
|
15
|
+
return self[:slug] || id.to_s
|
12
16
|
end
|
13
17
|
|
14
18
|
field :ordering, type: String, default: 'jjj'
|
data/lib/ish/user_profile.rb
CHANGED
@@ -31,6 +31,9 @@ class Ish::UserProfile
|
|
31
31
|
field :lang, default: 'en'
|
32
32
|
|
33
33
|
ROLES = [ :admin, :manager, :guy ]
|
34
|
+
ROLE_ADMIN = :admin
|
35
|
+
ROLE_MANAGER = :manager
|
36
|
+
ROLE_GUY = :guy
|
34
37
|
field :role_name, :type => Symbol
|
35
38
|
|
36
39
|
has_one :profile_photo, :class_name => 'Photo', :inverse_of => :profile_city
|
data/lib/ish_models.rb
CHANGED
data/lib/tag.rb
CHANGED
@@ -4,10 +4,10 @@ class Tag
|
|
4
4
|
include Ish::Utils
|
5
5
|
|
6
6
|
field :name, :type => String
|
7
|
-
validates :name, :
|
7
|
+
validates :name, uniqueness: true, presence: true, allow_nil: false # @TODO: tags should only be unique globally, and per-user.
|
8
8
|
|
9
9
|
field :slug
|
10
|
-
validates :slug, :
|
10
|
+
validates :slug, uniqueness: true, presence: true, allow_nil: false
|
11
11
|
|
12
12
|
field :descr, :type => String, :default => ''
|
13
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.33.
|
4
|
+
version: 0.0.33.166
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/ish/payment.rb
|
140
140
|
- lib/ish/premium_item.rb
|
141
141
|
- lib/ish/railtie.rb
|
142
|
+
- lib/ish/unsubscribe.rb
|
142
143
|
- lib/ish/user_profile.rb
|
143
144
|
- lib/ish/utils.rb
|
144
145
|
- lib/ish_models.rb
|