I hate creating admin areas from scratch in every Rails app I make. Thus, one sunny afternoon I've sat down and created DRYAdmin - mountable admin engine that "just works" with whatever models you have.*
Don't Repeat Yourself - ever again.
DISCLAIMER: IT'S VERSION 0.1., WHICH MEANS THAT IT PROBABLY SHOULDN'T BE USED IN PRODUCTION ENVIRONMENT YET.
Ok, you have been warned.
Add this line to your application's Gemfile:
gem 'dry_admin', group: :development
And then execute:
Or install it yourself as:
$ gem install dry_admin
DRYAdmin has currently three dependencies (apart from Rails itself). Bootstrap to make it look nice, Will Paginate to make Pagination work easily.
"bootstrap-sass", "~> 3.3" "will_paginate", "~> 3.1" "will_paginate-bootstrap", "~> 1"
Usage is dead simple. Just drop this line into your config/routes.rb file and that's it.
mount DryAdmin::Engine => '/admin'
You can change mounting point to anything you like of course. If you are using this gem and like it, get in touch with me - @HlavacekMichal. And if you feel very generous and want to support further development, you can
I have put together a quick demo - three models with references, you can fiddle with it as you like.
Please don't create any records with offensive content. Thank you.
If you want to add, customize, remove, change or polish anything, please open an issue and we can discuss that, and I'll most likely fix that until version 0.2. For those who will be reading the source code, I apologize in advance. I made this in one sunny afternoon, and haven't find a time to properly refactor and beautify the code yet.
The gem is available as open source under the terms of the MIT License.