Managing Views with ActiveRecord Migrations
Listen to this article
I just added very simple view support1 to redhillonrails_core trunk. The changes give you the ability to create and drop views using create_view :name, "definition" and drop_view :name respectively as well as preserving the views in schema.rb.
1WARNING: This is currently only supported for PostgreSQL. Creating views in MySQL will cause extra tables to be created in schema.rb! Probably not what you wanted.
Comments
Slick as always!
Posted by: Ted | February 21, 2008 11:07 AM