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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/video.rb +8 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84cc3820b6d71d08c41b6f903b82547dc048150f15a9beb76daf0dd0e17d91dc
4
- data.tar.gz: db8ea548690613d03cde7eb754c48ed86684184af3f7ef882b5329a822907d92
3
+ metadata.gz: af77cb84fd5fe123e232d66b36e090ed15f5a98c4ce97cfa49d8d1a0717f83d9
4
+ data.tar.gz: fd202da5dfb24c5850781b49a8965d4c266f02529917721a20864dea5491c4b9
5
5
  SHA512:
6
- metadata.gz: d15d489470b5af11cd24a764578b23631819863b62800d99cd1ea4a5dc949df19af41af4948f4310ebf1738c9a3d18970d3b4925b69025b8885de48a7521aa68
7
- data.tar.gz: 1b7fc6f63626ae2b9ebc7e97adc48b1267d4dbcf7b328dae1bdd1aec53e163864bd2bd0a429effc6e5790ccfa0942c31ceebd35861617abaad47723682ef3be7
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
 
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.148
4
+ version: 0.0.33.149
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox