diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-20 16:40:23 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-20 16:40:23 -0700 |
commit | 108a4531fdb63c33e77fc98145a4520acb1af980 (patch) | |
tree | 14c10f41913bf853e67104138fc87b7444b94bca /lib | |
parent | 33a9cdc9963489759b75102dd0df48b5a1987369 (diff) | |
download | rails-108a4531fdb63c33e77fc98145a4520acb1af980.tar.gz rails-108a4531fdb63c33e77fc98145a4520acb1af980.tar.bz2 rails-108a4531fdb63c33e77fc98145a4520acb1af980.zip |
inheritence meow meow meow
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/algebra/relations/operations/alias.rb | 3 | ||||
-rw-r--r-- | lib/arel/algebra/relations/utilities/compound.rb | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/arel/algebra/relations/operations/alias.rb b/lib/arel/algebra/relations/operations/alias.rb index 0331d98b85..c5d23783e5 100644 --- a/lib/arel/algebra/relations/operations/alias.rb +++ b/lib/arel/algebra/relations/operations/alias.rb @@ -1,7 +1,4 @@ module Arel class Alias < Compound - attributes :relation - deriving :initialize - alias_method :==, :equal? end end diff --git a/lib/arel/algebra/relations/utilities/compound.rb b/lib/arel/algebra/relations/utilities/compound.rb index 9f653bbafb..42ac519907 100644 --- a/lib/arel/algebra/relations/utilities/compound.rb +++ b/lib/arel/algebra/relations/utilities/compound.rb @@ -13,6 +13,10 @@ module Arel @requires end + def initialize relation + @relation = relation + end + [:wheres, :groupings, :orders, :havings, :projections].each do |operation_name| class_eval <<-OPERATION, __FILE__, __LINE__ def #{operation_name} |