Active Admin
-
Upload
greg-bell -
Category
Technology
-
view
5.763 -
download
1
description
Transcript of Active Admin
![Page 1: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/1.jpg)
ActiveAdminThe administration framework for Ruby on Rails
![Page 2: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/2.jpg)
Why?
![Page 3: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/3.jpg)
Complexity of Application
Complexity of Administration
![Page 4: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/4.jpg)
Production Application Administration != CRUD
![Page 5: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/5.jpg)
Dashboards, Analytics, Auditing, Reporting, Admin Notes, Admin Users, Groups & Permissions, Search & Finding Resources, CSV Export, Filtered Lists, API, Notifications, etc...
![Page 6: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/6.jpg)
+ CRUD
![Page 7: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/7.jpg)
![Page 8: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/8.jpg)
Goals:* Fast for developers* Usable by operations staff* Encode interface best practices* Extendable to meet req’s
![Page 9: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/9.jpg)
# 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](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/10.jpg)
![Page 11: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/11.jpg)
![Page 12: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/12.jpg)
$> rails g active_admin:resource Post
![Page 13: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/13.jpg)
# app/admin/posts.rbActiveAdmin.register Post doend
![Page 14: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/14.jpg)
`
![Page 15: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/15.jpg)
![Page 16: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/16.jpg)
![Page 17: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/17.jpg)
# 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](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/18.jpg)
![Page 19: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/19.jpg)
![Page 20: Active Admin](https://reader034.fdocuments.us/reader034/viewer/2022052203/55858656d8b42aac148b4ea6/html5/thumbnails/20.jpg)
We love pull requests!Twitter: @gregbellhttp://activeadmin.infogithub.com/gregbell/active_admin