From 4781d510da928862b2dd3eac3f9363eda321e60c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 4 Aug 2010 17:15:02 -0700 Subject: PERF: delegate is slow, lets just write a delegate method --- lib/arel/algebra/relations/utilities/compound.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/arel') diff --git a/lib/arel/algebra/relations/utilities/compound.rb b/lib/arel/algebra/relations/utilities/compound.rb index 8a8f3ab609..58c9c7422e 100644 --- a/lib/arel/algebra/relations/utilities/compound.rb +++ b/lib/arel/algebra/relations/utilities/compound.rb @@ -4,7 +4,7 @@ module Arel attr_reader :relation, :engine delegate :joins, :join?, :inserts, :taken, :skipped, :name, :externalizable?, - :column_for, :sources, :locked, :table_alias, :array, + :column_for, :locked, :table_alias, :array, :to => :relation def initialize relation @@ -18,6 +18,10 @@ module Arel @projections = nil end + def sources + @relation.sources + end + def table @relation.table end -- cgit v1.2.3