Forum: Ruby on Rails ROR switcher asks "Does ROR offer CRUD form (admin interfaces) auto-generation for databases?"

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Micheal Cooper (Guest)
on 2008-11-12 11:28
(Received via mailing list)
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)
Peter F. (Guest)
on 2008-11-12 14:02
(Received via mailing list)
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
Philipe Farias (Guest)
on 2008-11-12 17:04
(Received via mailing list)
You can use this plugin:
http://activescaffold.com/
Philipe Farias (Guest)
on 2008-11-12 17:04
(Received via mailing list)
You can use this plugin:
http://activescaffold.com/
Bobnation (Guest)
on 2008-11-13 03:12
(Received via mailing list)
On Nov 11, 11:13 pm, "Micheal Cooper" <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.
glennswest (Guest)
on 2008-11-13 10:56
(Received via mailing list)
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
Tricon T. (Guest)
on 2008-11-13 12:39
(Received via mailing list)
I third ActiveScaffold. It has become a quality, mature plugin.
Jodi S. (Guest)
on 2008-11-13 17:07
(Received via mailing list)
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
Jeremy E. (Guest)
on 2008-11-13 17:36
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
This topic is locked and can not be replied to.