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,…

Technology Insights

Making (and Verifying) the Migration to PostgreSQL in Rails

Install After installing PostgreSQL on Windows, I converted my Rails application from MySQL to PostgreSQL with the following steps: Create a new database in PostgreSQL Installed postgres-pr gem (Ruby driver) because the postgres gem (native driver) didn’t work. Will figure out why later on. Changed the appropriate Rails config stuff in database.yml development: adapter: postgresql…