From c9fa1b47f83f6d07b91fe10922b0e8d042933c1f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 27 Jul 2010 19:21:58 -0700 Subject: PERF: *args is slow. also removing a non-feature --- lib/arel/algebra/relations/relation.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/arel') diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index 1d395777c1..9936b9689f 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -123,7 +123,7 @@ module Arel end %w{ - where project order take skip group from having + where project order skip group having }.each do |operation_name| class_eval <<-OPERATION, __FILE__, __LINE__ def #{operation_name}(*arguments) @@ -133,6 +133,14 @@ module Arel OPERATION end + def take thing + Take.new self, thing + end + + def from thing + From.new self, thing + end + def lock(locking = nil) Lock.new(self, locking) end -- cgit v1.2.3