aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/arel/algebra/relations/utilities/compound.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/arel/algebra/relations/utilities/compound.rb b/lib/arel/algebra/relations/utilities/compound.rb
index 25f634ef78..80ac0b1351 100644
--- a/lib/arel/algebra/relations/utilities/compound.rb
+++ b/lib/arel/algebra/relations/utilities/compound.rb
@@ -2,13 +2,14 @@ module Arel
class Compound
include Relation
- attr_reader :relation
+ attr_reader :relation, :engine
delegate :joins, :join?, :inserts, :taken, :skipped, :name, :externalizable?,
:column_for, :sources, :locked, :table_alias, :array,
:to => :relation
def initialize relation
@relation = relation
+ @engine = relation.engine
@attributes = nil
@wheres = nil
@groupings = nil
@@ -32,9 +33,5 @@ module Arel
def unoperated_rows
relation.call.collect { |row| row.bind(self) }
end
-
- def engine
- relation.engine
- end
end
end