h1. Flexible Admin
h3. Reason for being
Flexible Admin is a Rails 3.1 Admin tool to generate an attractive data admin to handle login, data CRUD, search and sort while leaving an easy way to customize the particular needs of an app's custom admin functions.
I have found myself loving other admins for Rails, but many projects need enough admin customization that the value of a engines/magic was offset by the difficulty of customizing.
h4. Distinctions from other Rails admin gems
Flexible admin generates controller and view files for every model that you are managing, then invites you to get your hands dirty for the customizations of the admin.
It keeps the amount of generated code down by leveraging these gems/libraries to do the heavy lifting
# Devise for login
# Bootstrap for style
# inherited_resources for rest controllers
# Database Tables (js) for table searching and sorting
h2. Getting Started
In your Gemfile
gem 'flexible_admin'
run bundle install
run rails generate flexible_admin:install
run rake db:migrate
to create admin_users tables
h2. Adding models
run rails generate flexible_admin Post
to generate a admin/posts controller, /admin/posts route, and add Posts to the admin navigation
h2. Editing views and controllers
Edit views directly in the app/views/admin, app/views/layouts/admin and app/views/controllers/admin
h3. Dashboard
You can (and should) edit the /admin view at app/views/admin/index.html. It starts out blank.
h3. Sidebar
Every view file does or can have a content_for :sidebar
block where you can content for the sidebar
h2. Testing
h3. Gem tests
Flexible Admin as a gem is tested with rspec. The specs cover that the generator generates the right files. It does not test that you can actually admin in anything after the generator runs.
h4. Working with the tests gotchas
The generator specs really on a dummy Rails app in the spec/dummy folder. That dummy app has some models, a schema, and a db/test.sqlite3 that matter for the tests. You might have to dig into those if you are having problems modding the specs. One of the generators reads the models and the database columns to generate the admin forms, and so the dummy app has those files to test off it.
h2. License
This project rocks and uses MIT-LICENSE.