Trying to unscope joins.
Example:
class MyModel < ActiveRecord::Base
default_scope -> { joins("JOIN other_table ON other_table.this_table_id = this_table.id") }
scope :without_relation -> { unscope(:joins) }
end
The problem is that it unscope ALL joins, even those that are automatically constructed by AR relations.
Here's what I did:
Usage: