Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changing method name to be more clear

  • Loading branch information...
commit 4f037f651980138f0e951f77e16fb7bd64ae4217 1 parent a697744
@tenderlove tenderlove authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 lib/arel/table.rb
View
22 lib/arel/table.rb
@@ -36,10 +36,6 @@ def alias
end
end
- def tm
- SelectManager.new(@engine, self)
- end
-
def from table
SelectManager.new(@engine, table)
end
@@ -49,7 +45,7 @@ def joins manager
end
def join relation, klass = Nodes::InnerJoin
- return tm unless relation
+ return select_manager unless relation
sm = SelectManager.new(@engine)
case relation
@@ -62,27 +58,27 @@ def join relation, klass = Nodes::InnerJoin
end
def group *columns
- tm.group(*columns)
+ select_manager.group(*columns)
end
def order *expr
- tm.order(*expr)
+ select_manager.order(*expr)
end
def where condition
- tm.where condition
+ select_manager.where condition
end
def project *things
- tm.project(*things)
+ select_manager.project(*things)
end
def take amount
- tm.take amount
+ select_manager.take amount
end
def having expr
- tm.having expr
+ select_manager.having expr
end
def columns
@@ -98,6 +94,10 @@ def [] name
end
private
+ def select_manager
+ SelectManager.new(@engine, self)
+ end
+
def attributes_for columns
return nil unless columns
Please sign in to comment.
Something went wrong with that request. Please try again.