diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index 62d9bf177c..ccc1ab558f 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -1,5 +1,7 @@ module Arel module Relation + include Enumerable + @@connection_tables_primary_keys = {} attr_reader :count @@ -93,18 +95,9 @@ module Arel orders.collect { |o| o.to_sql(Sql::OrderClause.new(self)) } end - module Enumerable - include ::Enumerable - - def each - session.read(self).each { |e| yield e } - end - - def first - session.read(self).first - end + def each + session.read(self).each { |e| yield e } end - include Enumerable module Operable def join(other_relation = nil, join_class = InnerJoin) |