Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
a rails admin template
Ruby CSS JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
lib
spec
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
aureus.gemspec
config.ru

README.md

aureus

a framework for rails admin interfaces

Aureus is a tool to quickly generate admin interfaces for a rails app. It's between scaffolding and tools like ActiveAdmin.

Sample Controller

The following Controller will render a finished interface:

class ResourcesController < Aureus::ResourcesController
  before_filter :prepare_aureus

  def index
    @resources = Resource.all
  end

  def new
    @resource = Resource.new
  end

  def create
    Resource.create!(permitted_params[:resource])
    redirect_to resources_url
  end

  def show
    @resource = Resource.find(params[:id])
  end

  def edit
    @resource = Resource.find(params[:id])
  end

  def update
    resource = Resource.find(params[:id])
    resource.update!(permitted_params[:resource])
    redirect_to resource_url(resource)
  end

  def destroy
    resource = Resource.find(params[:id])
    resource.destroy!
    redirect_to resources_url
  end

  protected

  def prepare_aureus
    aureus({
      actions: [:index, :new, :create, :show, :edit, :update, :destroy],
      table_fields: [:id, :title, :text],
      form_fields: [:title, :text],
      item_fields: [:title, :text]
    })
  end

  def permitted_params
    params.permit(resource: [:title, :text])
  end
end

Generators

The following generators are available:

  • Run rails g aureus:setup to create the initializer.
  • Run rails g aureus:copy to copy the views and layout.
Something went wrong with that request. Please try again.