diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-20 15:18:22 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-20 15:18:22 -0700 |
commit | 35d66b6eee3cf51c37fa38eb7010c4dec8cd13a4 (patch) | |
tree | de7965327f89266a17ff66cf4be331f6af68e60b /lib/arel/algebra/relations | |
parent | 29c56a5831cc7c97c85b46b7f53c5b43bf2c08f9 (diff) | |
download | rails-35d66b6eee3cf51c37fa38eb7010c4dec8cd13a4.tar.gz rails-35d66b6eee3cf51c37fa38eb7010c4dec8cd13a4.tar.bz2 rails-35d66b6eee3cf51c37fa38eb7010c4dec8cd13a4.zip |
classify is not needed, so removing
Diffstat (limited to 'lib/arel/algebra/relations')
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index 34181beea2..3ed3a43503 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -43,10 +43,13 @@ module Arel join(other_relation, OuterJoin) end - [:where, :project, :order, :take, :skip, :group, :from, :having].each do |operation_name| + %w{ + where project order take skip group from having + }.each do |operation_name| class_eval <<-OPERATION, __FILE__, __LINE__ def #{operation_name}(*arguments, &block) - arguments.all?(&:blank?) && !block_given?? self : #{operation_name.to_s.classify}.new(self, *arguments, &block) + arguments.all?(&:blank?) && !block_given? ? + self : #{operation_name.capitalize}.new(self, *arguments, &block) end OPERATION end |