Project

aureus

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Aureus is a tool to quickly generate admin interfaces for a rails app. Its between scaffolding and tools like ActiveAdmin.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

aureus

This project is not longer maintained.

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.