Module: Squeel::Adapters::ActiveRecord::RelationExtensions::WhereChainCompatibility
- Includes:
- ActiveRecord::QueryMethods
- Defined in:
- lib/squeel/adapters/active_record/4.0/relation_extensions.rb
Overview
where.not is a pain. It calls the private ‘build_where` method on its scope, and since ActiveRecord::Relation already includes the original ActiveRecord::QueryMethods module, we have to find a way to trick the scope passed to the WhereChain initializer into having the original behavior. This is a way to do it that avoids using alias_method_chain.