Elevator

Elevator is a Rails plugin based on Rails' scaffolding. RubyForge project page

How to get it

./script/plugin install svn://rubyforge.org/var/svn/elevator

Description:

The elevator generator creates a controller to interact with a model. If the model does not exist, it creates the model as well. The generated code is based on Rails' built-in scaffolding, with various "improvements".

Whereas traditional scaffolding presents a "wiki-like" interface (full control - edit, create, delete - for all users), elevator creates separate admin-side and user-side controller and views. "generate elevator" creates *ONLY* the user-side environment, "generate elevator_admin" creates *ONLY* the admin-side, and "generate elevator_and_admin" will create both simultaneously.

The generator takes a model name, an optional controller name, and an optional list of views as arguments. "Elevated actions and views" are created automatically. Any views left over generate empty stubs.

The "elevated actions and views" are:

index, list, view, new, edit, destroy

If a controller name is not given, the plural form of the model name will be used. The model and controller names may be given in CamelCase or under_score and should not be suffixed with 'Model' or 'Controller'. Both model and controller names may be prefixed with a module like a file path; see the Modules Example for usage.

NOTES:

Examples:

./script/generate elevator Account Bank debit credit

This will generate a BankController with a full test suite and a basic user interface; the url for this controller will be http://HOST/bank/. Stub templates for actions debit and credit will be created as well. There will be no administrative features (ie, display only).

./script/generate elevator_admin Account Bank debit credit

This will generate a Admin::BankController with a full test suite and full administrative functions (create, edit, destroy), as well as stub templates for actions debit and credit. No user-facing interface will be created. The admin url will be http://HOST/admin/bank/.