Class: ActiveRecord::QueryMethods::WhereChain
- Inherits:
-
Object
- Object
- ActiveRecord::QueryMethods::WhereChain
- Defined in:
- lib/activerecord/missing/relation/query_methods.rb
Instance Method Summary collapse
Instance Method Details
#missing(*args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/activerecord/missing/relation/query_methods.rb', line 10 def missing(*args) args.each do |arg| reflection = @scope.klass._reflect_on_association(arg) opts = { reflection.table_name => { reflection.association_primary_key => nil } } @scope.left_outer_joins!(arg) @scope.where!(opts) end @scope end |