Module: ActiveRecordQuery::Joinable

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

Defined Under Namespace

Classes: JoinedResource

Instance Method Summary collapse

Instance Method Details

#build_joins(scope) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/active_record_query/concerns/joinable.rb', line 35

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