Class: ActiveRecord::QueryMethods::WhereChain
- Inherits:
-
Object
- Object
- ActiveRecord::QueryMethods::WhereChain
- Defined in:
- lib/active_record_extended/query_methods/where_chain.rb
Instance Method Summary collapse
Methods included from ActiveRecordExtended::WhereChain
#all, #any, #contained_within, #contained_within_or_equals, #contains, #contains_or_equals, #overlap
Methods included from ActiveRecordExtended::QueryMethods::AnyOf
Instance Method Details
#build_where_chain(opts, rest, &block) ⇒ Object
126 127 128 129 130 131 132 |
# File 'lib/active_record_extended/query_methods/where_chain.rb', line 126 def build_where_chain(opts, rest, &block) where_clause = @scope.send(:where_clause_factory).build(opts, rest) @scope.tap do |scope| scope.references!(PredicateBuilder.references(opts)) if opts.is_a?(Hash) scope.where_clause += where_clause.modified_predicates(&block) end end |