Please check my gem - GitHub - igorkasyanchuk/sql_view: Rails SQL Views made easy ;)
rails g sql_view:view ActiveUsers 'User.confirmed.where(active: true)' --materialized rails g sql_view:view DeletedProject 'Project.only_deleted'
Create a SQL view from AR relation (or plain SQL).
This is an easier alternative to scenic gem which is wonderful, but as for me requires more steps to add support of rails view into your project.
PS: production-ready, at least on my projects it works, so far so good