diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-18 01:25:09 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-18 01:25:09 -0400 |
commit | 65e419c172217f9747e2e56b36fcc4b6089a0d6d (patch) | |
tree | e68865661fba3eef0731c9885d3c3ba5fe45944c /lib/arel/algebra/relations/utilities | |
parent | 930c9f90a03729bdc380ab84882a118d8c17e54d (diff) | |
download | rails-65e419c172217f9747e2e56b36fcc4b6089a0d6d.tar.gz rails-65e419c172217f9747e2e56b36fcc4b6089a0d6d.tar.bz2 rails-65e419c172217f9747e2e56b36fcc4b6089a0d6d.zip |
Expand usages of #hash_on. The #hash definition it produces looks broken, but leaving it for now
Diffstat (limited to 'lib/arel/algebra/relations/utilities')
-rw-r--r-- | lib/arel/algebra/relations/utilities/compound.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/arel/algebra/relations/utilities/compound.rb b/lib/arel/algebra/relations/utilities/compound.rb index 676d80a737..5e775618f1 100644 --- a/lib/arel/algebra/relations/utilities/compound.rb +++ b/lib/arel/algebra/relations/utilities/compound.rb @@ -1,7 +1,6 @@ module Arel class Compound < Relation attr_reader :relation - hash_on :relation delegate :joins, :join?, :inserts, :taken, :skipped, :name, :externalizable?, :column_for, :engine, :to => :relation @@ -14,7 +13,16 @@ module Arel OPERATION end - private + def hash + @hash ||= :relation.hash + end + + def eql?(other) + self == other + end + + private + def arguments_from_block(relation, &block) block_given?? [yield(relation)] : [] end |