= ActiveAdminActsAsList
= Purpose
Add sortable columns for active admin.
= Features
= Prerequisites
You need active_admin and acts_as_list.
= Installation
Add it to your gemfile:
gem 'active_admin-acts_as_list'
Install your bundle:
bundle install
= Usage
Assuming you have a Players model:
class Player < ActiveRecord::Base
acts_as_list
default_scope :order => 'position ASC'
#...
end
You can add sortable columns, member actions and sorting like this:
ActiveAdmin.register Player do
config.sort_order = 'position'
# Add member actions for positioning.
sortable_member_actions
index do
# This adds columns for moving up, down, top and bottom.
sortable_columns
#...
column :firstname
column :lastname
default_actions
end
end
= Todo
= License
This project rocks and uses MIT-LICENSE.