Module: ActiveRecord
- Defined in:
- lib/break_dance/application_record_additions.rb
Overview
We monkey patch target_scope by just call .unsecured! on relation = … This is necessary because otherwise some parts of the BreakDance scopes leaked from some joined models. The worse thing here is that this method excludes some parts of the scopes. So we can end up with leaked “where” with no “select” or “join”. ToDo: However This may lead to unexpected behaviour if AR changes in future version, it is not tested for STI models and I generally don’t like exactly this approach.
Defined Under Namespace
Modules: Associations