ActiveAdmin.register JamRuby::User, :as => 'SchoolInterest' do

  menu :label => 'Interested in Schools', :parent => 'JamClass'

  config.sort_order = 'created_at desc'
  config.batch_actions = false
  config.per_page = 100
  config.paginate = true
  config.filters = false

  scope("All", default: true) { |scope| scope.where(school_interest: true) }

  index do
    column "Name" do |user|
      span do
        link_to "#{user.name} (#{user.email})", "#{Rails.application.config.external_root_url}/client#/profile/#{user.id}"
      end
    end
  end
end