Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema format to SQL. Scenic provides a convention for versioning views that keeps your migration history consistent and reversible and avoids having to duplicate SQL strings across migrations. As an added bonus, you define the structure of your view in a SQL file, meaning you get full SQL syntax highlighting in the editor of your choice and can easily test your SQL in the database console during development.
https://robots.thoughtbot.com/announcing-scenic--versioned-database-views-for-rails Show archive.org snapshot
Notes: PostgreSQL only
Posted by Emanuel to makandra dev (2016-01-25 14:15)