/wallaby

Rails way admin interface to manage data

Primary LanguageRubyMIT LicenseMIT

Wallaby

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

Wallaby is a Rails engine for managing data. It can be easily and deeply customized in a Rails way using decorators, controllers and views.

Animated Demo

For example, you can do complicated customization as below:

  • Register your product on e-commence after product is created at controller level (see Controller):

    # app/controllers/admin/products_controller.rb
    class Admin::ProductsController < Admin::ApplicationController
      def self.model_class; Product; end
    
      def create
        super do
          register_product_on_ecommence(resource) if resource.errors.blank?
        end
      end
    end
  • Customize to render the product markdown description (see Decorator):

    # app/decorators/product_decorators.rb
    class ProductDecorator < Admin::ApplicationDecorator
      self.show_fields[:description][:type] = 'markdown'
    end

    Then create the partial accordingly:

    <% # app/views/admin/products/show/_markdown.html.erb %>
    <% markdowner = Redcarpet::Markdown.new(Redcarpet::Render::HTML, {}) %>
    <%= raw markdowner.render(value) %>
  • Have a play with Demo

  • See Documentation for more How-to

  • See Search Manual for advance search

  • See Features and Requirements

  • See Change Logs

Getting Started

  1. Add wallaby gem to Gemfile:

    # ./Gemfile
    gem 'wallaby'
  2. Mount engine in routes.rb:

    # ./config/routes.rb
    Rails.application.routes.draw do
      # ... other routes
      mount Wallaby::Engine => "/desired_path"
      # ... other routes
    end
  3. Start Rails server

  4. Open Wallaby on your local machine at http::/localhost:3000/desired_path. That's it.

If you are using authentication rather than Devise, you will need to configure authentication as Configuration - Authentication describes.

Want to contribute?

Raise an issue, discuss and resolve!

Testing

Make sure that postgres, mysql and sqlite are installed (checkout spec/dummy/config/database.yml to confirm settings). Then run the following command to setup database for test environment:

RAILS_ENV=test rake db:setup

Then start the tests:

rspec

License

This project rocks and uses MIT-LICENSE.