diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-30 11:00:09 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-30 11:00:09 -0700 |
commit | 53bfaedaca5387bbc27a4ce04ea47367aaf4401a (patch) | |
tree | 3b4a625952cbe60a2321ee7632789aa4e6855606 /lib/arel | |
parent | 1e327a5047f71ea6c93cde208c8b9206627c7302 (diff) | |
download | rails-53bfaedaca5387bbc27a4ce04ea47367aaf4401a.tar.gz rails-53bfaedaca5387bbc27a4ce04ea47367aaf4401a.tar.bz2 rails-53bfaedaca5387bbc27a4ce04ea47367aaf4401a.zip |
PERF caching engine, converting to an attr_reader
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/algebra/relations/utilities/compound.rb | 7 |
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 |