ish_models 0.0.33.148 → 0.0.33.149
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/video.rb +8 -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: af77cb84fd5fe123e232d66b36e090ed15f5a98c4ce97cfa49d8d1a0717f83d9
|
4
|
+
data.tar.gz: fd202da5dfb24c5850781b49a8965d4c266f02529917721a20864dea5491c4b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '098f8e1013de0d59e3ebec5478b98147e5bdc166fc9ad03989c4af64cc4680f26fbda13f408f3dc919ce936654f875a469d91194ae94fef8e9b670feca1d7ec0'
|
7
|
+
data.tar.gz: b58f6e2a99d512afd89dcf0626cb69b0746a02c087fd7a7f179d7386974b9ee4a0d61be58c985c1df92c1ba0719e4ee1bc5b8beedf4e44d2f8e135199920c070
|
data/lib/video.rb
CHANGED
@@ -12,6 +12,14 @@ class Video
|
|
12
12
|
# default_scope ->{ where({ :is_public => true, :is_trash => false }).order_by({ :created_at => :desc }) }
|
13
13
|
|
14
14
|
field :is_trash, :type => Boolean, :default => false
|
15
|
+
def is_trash
|
16
|
+
if deleted_at
|
17
|
+
true
|
18
|
+
else
|
19
|
+
self[:is_trash]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
15
23
|
field :is_public, :type => Boolean, :default => false
|
16
24
|
field :is_feature, :type => Boolean, :default => false
|
17
25
|
|