I have a Rails 3.2 app with a model to a MySQL database view. It works fine, but when going through migrations to AWS and Heroku, I'm realizing having database structures like views outside of Rails is not a good thing since Rails can't create views ( as far I know ) as part of the migration process, which I want to start leveraging.
Anyway, I don't understand how to replicate the view in Rails using the Active Record Query Interface.
For my example, the view joins a historys table and an items table, where the item id is a foreign key in the history table.
So my Rails app has a model for items, and historys, and am looking for a way to create a query that joins the table, much like a database view does.