Database View Backed Scopes In Rails
01-Dec-2023 804
I’m on project that has a separate data team. The data team has direct access to our database so that they can run reports without having to interface with the Rails application. One of those reports is to return all bills that are eligible for payment.Our application currently has a scope to run that query, but unfortunately the data team cannot utilize it because they only have access to the database. Although I could have called to_sql on the scope and shared the query, my concern was that the application code and SQL query could drift over time.
Database View Backed Scopes In Rails #ruby #rubydeveloper #rubyonrails #Database #Backed #Scopes #Rails #database https://rubyonrails.ba/link/database-view-backed-scopes-in-rails