No commit activity in last 3 years
No release in over 3 years
Provides sortable_columns helper in active admin resource definitions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

< 5.0, >= 3.2
 Project Readme

ActiveAdminActsAsList¶ ↑

Purpose¶ ↑

Add sortable columns for active admin.

Features¶ ↑

  • Add member actions with one method call

  • Add sorting columns in your index views with one method call.

  • Integrates with acts_as_list

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
  acts_as_list
  default_scope :order => 'position ASC'

  #...
end

You can add sortable columns, member actions and sorting like this:

#app/admin/players.rb
ActiveAdmin.register Player do
  # Sort players by position
  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¶ ↑

  • Tests, tests, tests.

  • Better docs.

License¶ ↑

This project rocks and uses MIT-LICENSE.