20
ActiveAdmin The administration framework for Ruby on Rails

Active Admin

Embed Size (px)

DESCRIPTION

The lightning talk I gave at RailsConf 2011

Citation preview

Page 1: Active Admin

ActiveAdminThe administration framework for Ruby on Rails

Page 2: Active Admin

Why?

Page 3: Active Admin

Complexity of Application

Complexity of Administration

Page 4: Active Admin

Production Application Administration != CRUD

Page 5: Active Admin

Dashboards, Analytics, Auditing, Reporting, Admin Notes, Admin Users, Groups & Permissions, Search & Finding Resources, CSV Export, Filtered Lists, API, Notifications, etc...

Page 6: Active Admin

+ CRUD

Page 7: Active Admin
Page 8: Active Admin

Goals:* Fast for developers* Usable by operations staff* Encode interface best practices* Extendable to meet req’s

Page 9: Active Admin

# Add to Gemfile...gem "activeadmin"

# Install...$> rails generate active_admin:install

# Migrate..$> rake db:migrate

# Voila! Visit http://localhost:3000/admin$> rails server

Page 10: Active Admin
Page 11: Active Admin
Page 12: Active Admin

$> rails g active_admin:resource Post

Page 13: Active Admin

# app/admin/posts.rbActiveAdmin.register Post doend

Page 14: Active Admin

`

Page 15: Active Admin
Page 16: Active Admin
Page 17: Active Admin

# app/admin/products.rbActiveAdmin.register Product do # Create sections on the index screen scope :all, :default => true scope :available scope :drafts

# Filterable attributes on the index screen filter :title filter :author, :as => :select filter :price filter :created_at

# Customize columns displayed on the index screen in the table index do id_column column("State"){|product| status_tag product.state } column :title column "Price", :sortable => :price do |product| number_to_currency product.price end default_actions endend

Page 18: Active Admin
Page 19: Active Admin
Page 20: Active Admin

We love pull requests!Twitter: @gregbellhttp://activeadmin.infogithub.com/gregbell/active_admin