ActiveAdmin.register JamRuby::LiveStream, :as => 'LiveStream' do
  menu :parent => 'Misc'

  config.sort_order = 'created_at DESC'

  filter :listed
  filter :event_id

  before_build do |record|
    if !record.event_type.nil?
      puts "escape"
    else
      record.slug = 'please-do-this-sort-of-thing'
      record.starts_at = 10.days.from_now.midnight
      record.ends_at = 11.days.from_now.midnight
      record.event_type = 'eventbrite'
    end
  end

end
