Wallaby is a Rails engine that autocompletes the resourceful controller and view for a given ORM model (ActiveRecord, HER) for admin interface and other purposes.
It can be extended to support any ORM model and can be easily and deeply customized at MVC's different aspects by using decorators, controllers, type partials, servicers, authorizers, paginators and themes.
Add Wallaby to
# Gemfile gem 'wallaby'
As Admin Interface
Just mount Wallaby engine to desired path, e.g.
# config/routes.rb mount Wallaby::Engine, at: '/admin'
Or run installer to generate default application classes/templates under namespace e.g.
Admin and mount Wallaby engine to path
rails g wallaby:install admin
Restart rails server, and visit http://localhost:3000/admin to start exploring!
For General Purposes
Instead of using Rails scaffold generator to generate all the boilerplate code, Wallaby can help to quickly get the pages up for ordinary resourceful actions.
For example, if a model
Blog is generated:
rails generate model blog title:string body:text rails db:migrate
There are two ways to spin up things, choose what fits best:
add resources route to
wresourceshelper without any needs of customization
# config/routes.rb wresources :blogs, controller: 'wallaby/resources'
add blogs controller for later customization
# app/controllers/blogs_controller.rb class BlogsController < Wallaby::ResourcesController end
then add corresponding resources route using origin Rails
# config/routes.rb resources :blogs
Restart rails server, and visit http://localhost:3000/blogs to give it a taste!
- Features and Requirements
- Documentation for more usages and customization guides
- API Reference
- Change Logs
Want to contribute?
Raise an issue, discuss and resolve!
This project uses MIT License.