Module: ActiveRecordQuery::Conditionable

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/active_record_query/concerns/conditionable.rb

Instance Method Summary collapse

Instance Method Details

#build_conditions(scope) ⇒ Object



11
12
13
14
# File 'lib/active_record_query/concerns/conditionable.rb', line 11

def build_conditions(scope)
  conditions = Conditions::Builder.new(resource, self).build(self)
  conditions ? scope.where(conditions) : scope
end