ROR switcher asks "Does ROR offer CRUD form (admin interfaces) auto-generation for databases?"

I am currently using a very early framework called ERW, and I getting
into Ruby so that I can recreate (with paid help) a very large college
administration db app in Rails. Until relatively recently, I was going
to do this in Django, and one reason for the choice was Django’s
excellent feature of automatically generating the basic CRUD forms
(Django calls them admin forms) for a newly-created database. The
framework I am using now also has this feature, though it is overly
complex and difficult to maintain.

I want to know if there is a feature in or add-on to Rails that looks
at the database and creates customizable CRUD interfaces for all
tables, including selectable foreign keys and filters, etc. Ideally,
the forms would be scripts that can be filled-out and customized and
only need to be recreated when the database has been changed.

ERW’s admin interface is PHP code that dynamically creates the forms
when you call the script, and customization requires precise and
redundant coding because generic scripts are used to create all the
CRUD forms. For example, all admin list interfaces are done by
list.php, so getting an admin list for table people requires going to
‘list.php?table=people’.

I am hoping that ROR has a better way.


Micheal Cooper
Miyazaki, Japan (GMT+9, no DST)

Yes, that’s what scaffolding does (script/generate scaffold …)
For further details, look into any of the Rails tutorials, and Dave
Thomas’
book *Agile Web D. w/ Rails

*Peter F.
(847) 687-7646
Email: [email protected]
IM GTalk: peter.fitzgibbons
IM Yahoo: pjfitzgibbons
IM MSN: [email protected]
IM AOL: [email protected]

You can use this plugin:

On Nov 11, 11:13 pm, “Micheal Cooper” [email protected] wrote:

I am currently using a very early framework called ERW, and I getting
into Ruby so that I can recreate (with paid help) a very large college
administration db app in Rails. Until relatively recently, I was going
to do this in Django, and one reason for the choice was Django’s
excellent feature of automatically generating the basic CRUD forms
(Django calls them admin forms) for a newly-created database. The
framework I am using now also has this feature, though it is overly
complex and difficult to maintain.

The current scaffold generator is RESTful, and builds migrations based
on the input you give to the generator. If you are looking to set up
your database and then have a generator build the CRUD forms from that
database scheme, then you’ll want to look at the ActiveScaffold seen
in a prior comment.

You can use this plugin:

I third ActiveScaffold. It has become a quality, mature plugin.

Here my “strategy” for such a app.

  1. Export\copy the existing database schema, and a “snapshot” of the
    data into your database of choice.
    I usually use a ruby application at dbi level, or a rake task. On my
    blog there are several reviews of doing this.
    This also gets you a chance to “cleanup” the data. Fix things like
    “ID” being missing, junk data, and build any needed relationships.
  2. From the “imported” data, I use another script to generate all my
    controllers, models, and even menu’s.
    I use ActiveScaffold to handle the view, models are simple as well.
    For menus I use tabnav.
  3. Edit the menus to organize it to a more useful format
  4. At this point you can actually “use” the app
  5. Start adding and customizing the app to fufill the app. AS is
    highly customizable.
  6. Use RoleRequirment to separate your roles.

I’ve done this for 10-500 tables in a single app.
Even merging multiple apps into one rails app.

For reference look thru mentalpagingspace.blogspot.com

Jodi S. wrote:

activescafold has stumbled over the past 6 months - likely a lack of
love from the busy folks who built it

Based on the lack of attention, I’ve frozen our working version of
rails(ie. won’t be upgrading to the latest as activescaffold has
problems) and will be looking for a replacement

If you are looking for a replacement, you could try Scaffolding
Extensions (http://scaffolding-ext.rubyforge.org/).

Jeremy

On 12-Nov-08, at 10:01 PM, Tricon wrote:

administration db app in Rails. Until relatively recently, I was
your database and then have a generator build the CRUD forms from


Micheal Cooper
Miyazaki, Japan (GMT+9, no DST)

activescafold has stumbled over the past 6 months - likely a lack of
love from the busy folks who built it

Based on the lack of attention, I’ve frozen our working version of
rails(ie. won’t be upgrading to the latest as activescaffold has
problems) and will be looking for a replacement

Jodi