ish_models 0.0.33.111 → 0.0.33.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/report.rb +8 -0
- data/lib/video.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8791c1ba42049bc4324ac244a09147a5ad5bc728f1026658eebf965f8785367d
|
4
|
+
data.tar.gz: 1f5ab1cab47b1bdfc28b88634a4d487bc2cc2b4389e30986fde6d2a539d8d93a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3040db3672aaad21fd227da6c8a750c9db5a96ef9dac0b31fd117d64348b9b82949d4df50b5c88330970da27b7c73c6a337a48634a0d94591914622a9072cbe
|
7
|
+
data.tar.gz: b7aff88f1921508842ffe3143809dc2e3f6c7140dd62e6d05446fe3377f98ac1dd0a28eb87d9c6ba4e738d2b31f362972803fd1be45dc687e3e2575079629a55
|
data/lib/report.rb
CHANGED
@@ -146,4 +146,12 @@ class Report
|
|
146
146
|
self.venues[0] || nil
|
147
147
|
end
|
148
148
|
|
149
|
+
## copy-paste
|
150
|
+
field :premium_tier, type: Integer, default: 0 # how many stars need to spend, to get access? 0 = free
|
151
|
+
def is_premium
|
152
|
+
premium_tier > 0
|
153
|
+
end
|
154
|
+
def premium?; is_premium; end
|
155
|
+
has_many :premium_purchases, class_name: '::Gameui::PremiumPurchase', as: :item
|
156
|
+
|
149
157
|
end
|
data/lib/video.rb
CHANGED
@@ -73,4 +73,13 @@ class Video
|
|
73
73
|
Site.update_all updated_at: Time.now
|
74
74
|
end
|
75
75
|
|
76
|
+
## copy-paste
|
77
|
+
field :premium_tier, type: Integer, default: 0 # how many stars need to spend, to get access? 0 = free
|
78
|
+
def is_premium
|
79
|
+
premium_tier > 0
|
80
|
+
end
|
81
|
+
def premium?; is_premium; end
|
82
|
+
has_many :premium_purchases, class_name: '::Gameui::PremiumPurchase', as: :item
|
83
|
+
|
84
|
+
|
76
85
|
end
|