diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-15 14:53:50 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-15 14:54:07 -0700 |
commit | f6e7e11ad28555860bb8a1bb362fa091f48cc81a (patch) | |
tree | 7c9693cbd2a81aa69fa72ed5bc08eea9c767c998 /activerecord/lib/active_record | |
parent | 790b4011b27b4d4454c1613922887ed944aa6c8d (diff) | |
download | rails-f6e7e11ad28555860bb8a1bb362fa091f48cc81a.tar.gz rails-f6e7e11ad28555860bb8a1bb362fa091f48cc81a.tar.bz2 rails-f6e7e11ad28555860bb8a1bb362fa091f48cc81a.zip |
use the cached arel table
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency/join_base.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency/join_part.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency/join_base.rb b/activerecord/lib/active_record/associations/join_dependency/join_base.rb index 48de12bcd5..adc9f63aec 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_base.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_base.rb @@ -18,7 +18,7 @@ module ActiveRecord end def table - Arel::Table.new(table_name, arel_engine) + base_klass.arel_table end def aliased_table_name diff --git a/activerecord/lib/active_record/associations/join_dependency/join_part.rb b/activerecord/lib/active_record/associations/join_dependency/join_part.rb index d39ce94c99..e6da4d3c9e 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_part.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_part.rb @@ -19,7 +19,7 @@ module ActiveRecord # association. attr_reader :base_klass, :children - delegate :table_name, :column_names, :primary_key, :arel_engine, :to => :base_klass + delegate :table_name, :column_names, :primary_key, :to => :base_klass def initialize(base_klass, parent) @base_klass = base_klass |