Chapter 5. Extending Views


So far, you've experienced amazing power in a short time. Rails Active Record has let you build surprisingly capable models with no more than a handful of lines of code. Scaffolding used the metaprogramming capabilities of Ruby in concert with the metadata in Active Record to instantly slap a web face on our database tables. The Rails generators and glue code kept the structure consistent and provided the necessary tools to develop and debug the application at every step of the way. Now that we have scaffolding in place for our database tables, its time to start replacing that scaffolding interface with a prettier interfaceone that lets us manipulate the relationships between our tables.

This will happen faster than you might think; now the fun really begins, as our web application's user interface rapidly take shape. In this chapter, you will see how to:

  • Take control of the views rendered through scaffolding

  • Handle relationships in our views

  • Manage layouts

  • Make a simple change to Rails routing

  • Manage styles



Ruby on Rails[c] Up and Running
Ruby on Rails[c] Up and Running
ISBN: B003D3OGCY
EAN: N/A
Year: 2006
Pages: 94

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net