Class: Ish::AppModel2
- Inherits:
-
Object
- Object
- Ish::AppModel2
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/trash/app_model2.rb
Overview
@deprecated, remove
Class Method Summary collapse
Class Method Details
.list(conditions = { :is_trash => false }) ⇒ Object
15 16 17 18 |
# File 'lib/trash/app_model2.rb', line 15 def self.list conditions = { :is_trash => false } out = self.where( conditions ).order_by( :created_at => :desc ) [['', nil]] + out.map { |item| [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ] } end |