class Wco::Gallery

def self.list conditions = {}

def self.list conditions = {}
  out = self.unscoped.where( conditions ).order_by( :created_at => :desc )
  [['', nil]] + out.map do |item|
    [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ]
  end
end

def export_fields

def export_fields
  %w| name subhead descr |
end

def published

def published
  where({ :is_public => true }).order_by({ :created_at => :desc })
end