lib/video.rb in ish_models-0.0.33.148 vs lib/video.rb in ish_models-0.0.33.149
- old
+ new
@@ -10,9 +10,17 @@
field :descr, :type => String, :as => :description
# default_scope ->{ where({ :is_public => true, :is_trash => false }).order_by({ :created_at => :desc }) }
field :is_trash, :type => Boolean, :default => false
+ def is_trash
+ if deleted_at
+ true
+ else
+ self[:is_trash]
+ end
+ end
+
field :is_public, :type => Boolean, :default => false
field :is_feature, :type => Boolean, :default => false
field :x, :type => Float
field :y, :type => Float