Scaffolding an Application from schema.rb

14:30–15:15 Wednesday, 3-09-2008
Location: Saal Maritim B Level: Intermediate
Average rating: *....
(1.86, 7 ratings)

The presentation will illustrate a method to obtain a complete scaffold of an application from a simple db-schema.

First, some preliminary choices will be explained:

  • streamlined as a main framework
  • active_scaffold for all the master-details view
  • pretty acts_as_loggable and acts_as_secured for logging and authenticate
  • Widgets (from Seesaw ) for navigation

Then use schema.rb, produced by rake db:schema:dump; we can add some comments inline with create_table statement to remember if I must create model, if the model must be loggable, the controller name, the migration order and so on, then we see:

  1. How to Create migrations
  2. How to Create models (taking care of HABTM, when necessary)
  3. How to Create controllers (adding acts_as_streamlined)
  4. How to Create streamlined configuration classes

Ok, now put all on a rake task, do-it and scaffold is ready!

Photo of Tomaso Minelli

Tomaso Minelli

University of Padua

I started my career programming in C, finally I come to Ruby, crossing tempestuous VB and Php: I survived with the help of Perl.

It’s ten year that I work for the University of Padua, after five years of “code for food” in the Itanian north-east.

Now I’m a in project leader’s paradise (hell?) with IDRA project.

News and Coverage
co-presented by Ruby Central, Inc. O'Reilly
  • Engine Yard
  • Sun Microsystems
  • Brightbox
  • ELC Technologies
  • T3N

Sponsor Opportunities

For information on exhibition and sponsorship opportunities at RailsConf Europe, contact Yvonne Romaine at

Press and Media

For media-related inquiries, contact Maureen Jennings at

Contact Us

View a complete list of RailsConf Europe Contacts