ActiveAdmin.register JamRuby::AffiliateLink, :as => 'Affiliate Links' do

  menu :label => 'Links', :parent => 'Affiliates'

  config.sort_order = 'created_at ASC'
  config.batch_actions = false
  # config.clear_action_items!
  config.filters = false
  config.per_page = 50
  config.paginate = true

  #form :partial => 'form'


  form do |f|
    f.inputs 'Fields' do
      f.input(:name, :input_html => { :maxlength => 255 })
      f.input(:link, :input_html => { :maxlength => 255 })
    end
    f.actions
  end

  index do

    column 'Name' do |oo|
      oo.name
    end
    column 'Link' do |oo|
      oo.link
    end
    actions
  end
end
