I think it’s possible to determine which reviewable types must be filtered out by doing something like this:
class Reviewable < ActiveRecord::Base
def self.exclude_types
db_types = Reviewable.distinct.pluck(:type)
@exclude_types ||= db_types - Reviewable.types
end
...
end
Then we can use those types to apply a default scope. We’ll probably have to add a type
index to the table.