Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
  app
  bin
  lib
  .gitignore
  .travis.yml
  CODE_OF_CONDUCT.md
  Gemfile
  README.md
  Rakefile
  TODO.md
  admin_toolbox.gemspec
Size: Mime:
  README.md

AdminToolbox

Adds reusable 'tools' to your Admin interface. Currently designed for ActiveAdmin, but aims to grow decoupled enough to be useful in other spaces.

Installation

Add this line to your application's Gemfile:

gem 'admin_toolbox'

And then execute:

$ bundle

Or install it yourself as:

$ gem install admin_toolbox

Usage

Call the admin_toolbox method and pass in which tools you'd like for that resource.

# app/admin/model_name.rb
ActiveAdmin.register Model do
  admin_toolbox :previewable, :action_bar, :friendly_findable, :sortable
end

The Toolbox

ActionBar

Aims to provide a unified fancy saving experience.

FriendlyFindable

Configures ActiveAdmin to use FriendlyId's finder method.

Previewable

Adds the preview ability to ActiveAdmin

Sortable

Adds editorial sort to your index table. Defaults to a position column named position but can be customized by overriding the position_field method in the controller.

Setup

# active_admin.coffee
#= require admin_toolbox/sortable_table
$ ->
  $('table#index_table_plural_model_name').sortable_table()
# app/admin/model_name.rb
index do
  # ...
  sort_column
  # ...
end