Module: BabySqueel::Compat

Defined in:
lib/baby_squeel/compat.rb

Defined Under Namespace

Modules: DSL, QueryMethods Classes: KeyPath

Class Method Summary collapse

Class Method Details

.enable!Object

Monkey-patches BabySqueel and ActiveRecord in order to behave more like Squeel



5
6
7
8
9
# File 'lib/baby_squeel/compat.rb', line 5

def self.enable!
  BabySqueel::DSL.prepend BabySqueel::Compat::DSL
  ::ActiveRecord::Base.singleton_class.prepend QueryMethods
  ::ActiveRecord::Relation.prepend QueryMethods
end