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

**URL:** <https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107>\
**Category:** Rails\
**Created:** [November 12, 2008, 10:28am UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107 "2008-11-12T10:28:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 12, 2008, 10:28am UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/1 "2008-11-12T10:28:30Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 12, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/2 "2008-11-12T13:02:23Z")

</div>

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: removed\_email\_address@domain.invalid  
IM GTalk: peter.fitzgibbons  
IM Yahoo: pjfitzgibbons  
IM MSN: removed\_email\_address@domain.invalid  
IM AOL: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 12, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/3 "2008-11-12T16:04:11Z")

</div>

You can use this plugin:

> **[噂のUR賃貸事情 |](http://www.activescaffold.com/)**
>
> UR賃貸住宅は、子連れ家族に人気があります。 1つは、間取りに対する専有面積が広いところです。将来的に家族が増えても安心ですよ。次に、安全性の高い子供達の共有空間がある点です。最後は、緑溢れる豊かな自然環境があるところです。子供達がのびのびと成長していける空間が、UR賃貸住宅には沢山あります。

---

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 13, 2008, 2:12am UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/4 "2008-11-13T02:12:15Z")

</div>

On Nov 11, 11:13 pm, “Micheal Cooper” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

---

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 12, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/5 "2008-11-12T16:04:12Z")

</div>

You can use this plugin:

> **[噂のUR賃貸事情 |](http://www.activescaffold.com/)**
>
> UR賃貸住宅は、子連れ家族に人気があります。 1つは、間取りに対する専有面積が広いところです。将来的に家族が増えても安心ですよ。次に、安全性の高い子供達の共有空間がある点です。最後は、緑溢れる豊かな自然環境があるところです。子供達がのびのびと成長していける空間が、UR賃貸住宅には沢山あります。

---

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 13, 2008, 11:39am UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/6 "2008-11-13T11:39:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 13, 2008, 9:56am UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/7 "2008-11-13T09:56:45Z")

</div>

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](http://mentalpagingspace.blogspot.com)

---

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 13, 2008, 4:36pm UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/8 "2008-11-13T16:36:40Z")

</div>

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/](http://scaffolding-ext.rubyforge.org/)).

Jeremy

---

<div class="post-metadata">

**Author:** ![Micheal\_Cooper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Micheal\_Cooper](https://www.ruby-forum.com/u/Micheal_Cooper)\
**Post date:** [November 13, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/ror-switcher-asks-does-ror-offer-crud-form-admin-interfaces-auto-generation-for-databases/153107/9 "2008-11-13T16:07:39Z")

</div>

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
