aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/table.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/table.rb')
-rw-r--r--lib/arel/table.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/table.rb b/lib/arel/table.rb
index 0ab39f134d..7933c8c1a4 100644
--- a/lib/arel/table.rb
+++ b/lib/arel/table.rb
@@ -10,6 +10,10 @@ module Arel
@engine = engine
end
+ def where expression
+ TreeManager.new(@engine).from(self).where expression
+ end
+
def columns
@engine.connection.columns(@name, "#{@name} Columns").map do |column|
Attributes.for(column).new self, column.name, column