aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-27 19:21:58 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-27 19:21:58 -0700
commitc9fa1b47f83f6d07b91fe10922b0e8d042933c1f (patch)
tree0503dff3513577498d59171c5cb257c7a8fe2f29 /lib/arel
parent4bc43c7152a30752166964249f81302c21187e66 (diff)
downloadrails-c9fa1b47f83f6d07b91fe10922b0e8d042933c1f.tar.gz
rails-c9fa1b47f83f6d07b91fe10922b0e8d042933c1f.tar.bz2
rails-c9fa1b47f83f6d07b91fe10922b0e8d042933c1f.zip
PERF: *args is slow. also removing a non-feature
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/algebra/relations/relation.rb10
1 files changed, 9 insertions, 1 deletions
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