Optimising Ruby on Rails database query
I was asked to investigate a very slow RoR application and determined that it was due to the way the ActiveRecord was written. These were the 2 models causing the problems:
# app/models/event.rb
class Event < ApplicationRecord
scope :final, -> { wh...
schiffheimlich.hashnode.dev3 min read