Technology Insights

Basics of Layouts and Nested Layouts in Rails

Layout basics Here’s Duane Johnson’s concise explanation of how layouts generally work in Rails. To summarize this blog article, layouts occur at 2 levels (applciation-wide or controller-wide) by default: The entire Rails application (all views of all controllers) will use this layout: views/layouts/application.rhtml All views within a single controller will use this layout. For example,…

Details
Technology Insights

Rants About Rails Database Migrations

Migrations as version control for databases

When I first learned about Rails migration, I immediately thought that dropping down a revision would be something you would do often. In actuality, Rails migrations is more like a version control for databases. Since databases changes require modifications to both code and data, you cannot simply use a source code version control system like Subversion or Sourcesafe. You need a more advanced revisioning system for databases… hence Rails Migrations.

Details