Automatic database view creation for ActiveRecord