Active Admin: Create Your Admin Interface the Easy Way
Active AdminCreate your admin interface the easy wayNestor Walker
Install● Add to your Gemfile:● For Rails >= 3.1 Active Admin is also dependant on sass-rails and a beta version of meta_search:● After updating the Bundle, run the active admin install generator.● Migrate your db and start the server● Now visit http://localhost:3000/admin● Log in with email@example.com / password● You now have an admin interface.
ModelsActive admin will set up your models with the following generator:This creates a file in app/admin/my_model_name.rb
Models● Index Columns By default Active Admin will create a table view of the model with a columnfor each field. This can also be customized.
Models● Filters Active Admin out of the box has the ability to filter by string, date_range,numeric, select, and check_boxes. By default it will create filters with all themodels fields using the appropriate selection type.
DashboardThe dashboard can be customized in a way similar to the index pages.A partial can also be used inside a section with:render new_users # => this will render/app/views/admin/dashboard/_new_users.html.erb