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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a783500814f32b8c34ef3feade0aef48169ea390eb033422518593edef4cf67b
4
- data.tar.gz: ae18235c6b0862be5e0d09b53c86002d1bf76824d17391b2a4507749f358d911
3
+ metadata.gz: 0d2c393a3ae573621c06610661cda6a73bf8173aeaeea1ee126256c31d0848a4
4
+ data.tar.gz: ff72185a3f761ddd7dd5efdb8bbf99428763ab763319c6da3b3ad2d35216d575
5
5
  SHA512:
6
- metadata.gz: 4522756a1cedf0b0a570e13ad1a35dda926930aadbb7dbe5112de03923b3c5f133ee1e0c569639bf01fccb4be7926a82d406523c8ef1fe2c18705c9bc93e70be
7
- data.tar.gz: 45b1305bdb9395f37325d78183d746ff7c9c2f6a9bb01ca533dc56b11ac176816cf9ad01b612d58514ff43e7ea0395b126b7fe682ae4a81fcd4091420493d591
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'
@@ -0,0 +1,11 @@
1
+
2
+ class Ish::Unsubscribe
3
+ include Mongoid::Document
4
+ include Mongoid::Timestamps
5
+
6
+ field :email
7
+ field :unsubscribed_at
8
+ field :reason
9
+
10
+ end
11
+
@@ -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
@@ -42,6 +42,7 @@ require 'ish/issue'
42
42
  require 'ish/lead'
43
43
  require 'ish/payment'
44
44
  require 'ish/premium_item'
45
+ require 'ish/unsubscribe'
45
46
  require 'ish/utils'
46
47
  require 'ish/user_profile'
47
48
 
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, :uniqueness => true, :allow_nil => false
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, :uniqueness => true, presence: true, allow_nil: false
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.164
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