Automatic PostgreSQL database view creation for ActiveRecord