There's a lot of open issues
No release in over a year
Autocomplete the resourceful actions and views for ORMs for admin interface and other purposes.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Project Readme

Wallaby

Gem Version License: MIT Travis CI Maintainability Test Coverage Inch CI

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.

Try the demo here.

Animated Demo

Install

Add Wallaby to Gemfile.

# Gemfile
gem 'wallaby'

And re-bundle.

bundle install

Basic Usage

As Admin Interface

Just mount Wallaby engine to desired path, e.g. /admin in config/routes.rb.

# 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 /admin.

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 config/routes.rb using wresources helper 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 resources helper

    # config/routes.rb
    resources :blogs
    

Restart rails server, and visit http://localhost:3000/blogs to give it a taste!

Documentation

Want to contribute?

Raise an issue, discuss and resolve!

License

This project uses MIT License.