diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-04 17:15:02 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-04 17:15:02 -0700 |
commit | 4781d510da928862b2dd3eac3f9363eda321e60c (patch) | |
tree | 50b83a113b0cc2de0fbc7ca5d6910f18e4c70d06 /lib | |
parent | 0bb00a6999c7df2ea1c641e8bd6ada3023981617 (diff) | |
download | rails-4781d510da928862b2dd3eac3f9363eda321e60c.tar.gz rails-4781d510da928862b2dd3eac3f9363eda321e60c.tar.bz2 rails-4781d510da928862b2dd3eac3f9363eda321e60c.zip |
PERF: delegate is slow, lets just write a delegate method
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/algebra/relations/utilities/compound.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |