1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

changing method name to be more clear

This commit is contained in:
Aaron Patterson 2010-09-27 13:52:50 -07:00
parent a697744637
commit 4f037f6519

View file

@ -36,10 +36,6 @@ module Arel
end end
end end
def tm
SelectManager.new(@engine, self)
end
def from table def from table
SelectManager.new(@engine, table) SelectManager.new(@engine, table)
end end
@ -49,7 +45,7 @@ module Arel
end end
def join relation, klass = Nodes::InnerJoin def join relation, klass = Nodes::InnerJoin
return tm unless relation return select_manager unless relation
sm = SelectManager.new(@engine) sm = SelectManager.new(@engine)
case relation case relation
@ -62,27 +58,27 @@ module Arel
end end
def group *columns def group *columns
tm.group(*columns) select_manager.group(*columns)
end end
def order *expr def order *expr
tm.order(*expr) select_manager.order(*expr)
end end
def where condition def where condition
tm.where condition select_manager.where condition
end end
def project *things def project *things
tm.project(*things) select_manager.project(*things)
end end
def take amount def take amount
tm.take amount select_manager.take amount
end end
def having expr def having expr
tm.having expr select_manager.having expr
end end
def columns def columns
@ -98,6 +94,10 @@ module Arel
end end
private private
def select_manager
SelectManager.new(@engine, self)
end
def attributes_for columns def attributes_for columns
return nil unless columns return nil unless columns