Method: ActiveRecordQuery::Joinable#build_joins

Defined in:
lib/active_record_query/concerns/joinable.rb

#build_joins(scope) ⇒ Object



47
48
49
50
51
52
53
# File 'lib/active_record_query/concerns/joinable.rb', line 47

def build_joins(scope)
  arg_stacker = ArgumentStacker.new(self, :join)
  arg_stacker.list.each do |join_params|
    scope = scope.joins(join_params)
  end
  scope
end