Scaffolding an Application from schema.rb
Location: Saal Maritim B Level: Intermediate
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:
- How to Create migrations
- How to Create models (taking care of HABTM, when necessary)
- How to Create controllers (adding acts_as_streamlined)
- How to Create streamlined configuration classes
Ok, now put all on a rake task, do-it and scaffold is ready!
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.